diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-04 16:05:46 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-04 16:05:46 +0000 |
commit | 7d237da3934bec416fab604af74f61e8c53f0505 (patch) | |
tree | 67e6f07c6c3531b2a9fe318863c24e2bcec2608c /src/lua/lua_worker.c | |
parent | cd60c1621b2f90aede6584a490aa2a8abf897980 (diff) | |
download | rspamd-7d237da3934bec416fab604af74f61e8c53f0505.tar.gz rspamd-7d237da3934bec416fab604af74f61e8c53f0505.zip |
[Minor] Slightly improve logging in case of termination
Diffstat (limited to 'src/lua/lua_worker.c')
-rw-r--r-- | src/lua/lua_worker.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lua/lua_worker.c b/src/lua/lua_worker.c index 940c6ae4a..4a3e4e908 100644 --- a/src/lua/lua_worker.c +++ b/src/lua/lua_worker.c @@ -841,7 +841,8 @@ lua_worker_spawn_process (lua_State *L) /* Wait for parent to reply and exit */ rc = read (cbdata->sp[1], inbuf, sizeof (inbuf)); - if (memcmp (inbuf, "\0\0\0\0", 4) == 0) { + if (rc >= sizeof (inbuf) && + memcmp (inbuf, "\0\0\0\0", sizeof (inbuf)) == 0) { exit (EXIT_SUCCESS); } else { |