# HG changeset patch # User Richard Mortimer # Date 1295968900 0 # Node ID 6cc2a4cdc468189caa5ca5b0ae579b6cb039cb60 # Parent 24bf028aa8a0845c317311294a2a64b657813d80 Ensure that child processes exit if the execlp call fails and returns control back to mlmmj-maint. diff -r 24bf028aa8a0 -r 6cc2a4cdc468 src/mlmmj-maintd.c --- a/src/mlmmj-maintd.c Tue Jan 17 14:14:26 2012 +1100 +++ b/src/mlmmj-maintd.c Tue Jan 25 15:21:40 2011 +0000 @@ -356,6 +356,10 @@ "-T", to, "-a", (char *)NULL); } + log_error(LOG_ARGS, "Could not execlp %s", + mlmmjsend); + /* This is the child. Exit on failure. */ + exit(EXIT_FAILURE); } } @@ -474,6 +478,10 @@ "-s", subnewname, "-a", "-D", (char *)NULL); + log_error(LOG_ARGS, "Could not execlp %s", + mlmmjsend); + /* This is the child. Exit on failure. */ + exit(EXIT_FAILURE); } } @@ -618,7 +626,8 @@ "-p", (char *)NULL); log_error(LOG_ARGS, "Could not execlp %s", mlmmjbounce); - return 1; + /* This is the child. Exit on failure. */ + exit(EXIT_FAILURE); } } closedir(bouncedir); @@ -757,7 +766,8 @@ "-b", "-a", address, (char *)NULL); log_error(LOG_ARGS, "Could not execlp %s", mlmmjunsub); - return 1; + /* This is the child. Exit on failure. */ + exit(EXIT_FAILURE); } } closedir(bouncedir);