From: Timo Sirainen Date: Mon, 5 Apr 2010 07:36:31 +0000 (+0300) Subject: gdbhelper: Check wait() status result a bit more correctly. X-Git-Tag: 2.0.beta5~199 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f57e8837e1675791f9e4a6e270004ac613b9d506;p=thirdparty%2Fdovecot%2Fcore.git gdbhelper: Check wait() status result a bit more correctly. --HG-- branch : HEAD --- diff --git a/src/util/gdbhelper.c b/src/util/gdbhelper.c index 690c5553dc..2f192243d2 100644 --- a/src/util/gdbhelper.c +++ b/src/util/gdbhelper.c @@ -48,7 +48,7 @@ int main(int argc, char *argv[]) if (wait(&status) < 0) i_fatal("wait() failed: %m"); - if (status != 0) { + if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { char buf[1024]; ssize_t ret;