]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
gdbhelper: Check wait() status result a bit more correctly.
authorTimo Sirainen <tss@iki.fi>
Mon, 5 Apr 2010 07:36:31 +0000 (10:36 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 5 Apr 2010 07:36:31 +0000 (10:36 +0300)
--HG--
branch : HEAD

src/util/gdbhelper.c

index 690c5553dc2e5fa4e2479403168ebc7355ff84f7..2f192243d2685796864f864bcfb9dfc8ac74748a 100644 (file)
@@ -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;