]> Pileus Git - ~andy/fetchmail/commitdiff
Properly report EXIT_FAILURE if the plugin/plugout execvp() fails.
authorMatthias Andree <matthias.andree@gmx.de>
Fri, 29 Apr 2011 14:23:16 +0000 (16:23 +0200)
committerMatthias Andree <matthias.andree@gmx.de>
Fri, 29 Apr 2011 14:54:12 +0000 (16:54 +0200)
socket.c

index 91ca662b00e537335c685b3500930abdfa23688e..c2059debe5020439b8ab41d3394174eb002ff56d 100644 (file)
--- a/socket.c
+++ b/socket.c
@@ -179,7 +179,7 @@ static int handle_plugin(const char *host,
                (void) close(fds[1]);
                if ( (dup2(fds[0],0) == -1) || (dup2(fds[0],1) == -1) ) {
                        report(stderr, GT_("dup2 failed\n"));
-                       exit(1);
+                       exit(EXIT_FAILURE);
                }
                /* fds[0] is now connected to 0 and 1; close it */
                (void) close(fds[0]);
@@ -188,7 +188,7 @@ static int handle_plugin(const char *host,
                argvec = parse_plugin(plugin,host,service);
                execvp(*argvec, argvec);
                report(stderr, GT_("execvp(%s) failed\n"), *argvec);
-               exit(0);
+               exit(EXIT_FAILURE);
                break;
        default:        /* parent */
                /* NOP */