aboutsummaryrefslogtreecommitdiffstats
path: root/capture_sync.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2008-01-09 11:50:22 +0000
committerGuy Harris <guy@alum.mit.edu>2008-01-09 11:50:22 +0000
commit0146bbda0944c65594994c79038b19bd76bb0e32 (patch)
tree5ce7269daa7cd3b793dfa61b65ce7ba29854f02a /capture_sync.c
parent0a6424f732d517462989b48767bd005923db2aad (diff)
Exit with 1, not 2, if exec fails, so we don't report an additional
error for the exit status, over and above the one for the exec failure. svn path=/trunk/; revision=24041
Diffstat (limited to 'capture_sync.c')
-rw-r--r--capture_sync.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/capture_sync.c b/capture_sync.c
index 92b3cb06a0..fed74a4a2a 100644
--- a/capture_sync.c
+++ b/capture_sync.c
@@ -517,8 +517,11 @@ sync_pipe_start(capture_options *capture_opts) {
/* Exit with "_exit()", so that we don't close the connection
to the X server (and cause stuff buffered up by our parent but
not yet sent to be sent, as that stuff should only be sent by
- our parent). */
- _exit(2);
+ our parent). We've sent an error message to the parent, so
+ we exit with an exit status of 1 (any exit status other than
+ 0 or 1 will cause an additional message to report that exit
+ status, over and above the error message we sent to the parent). */
+ _exit(1);
}
sync_pipe_read_fd = sync_pipe[PIPE_READ];
@@ -688,8 +691,11 @@ sync_pipe_open_command(const char** argv, int *read_fd, int *fork_child, gchar *
/* Exit with "_exit()", so that we don't close the connection
to the X server (and cause stuff buffered up by our parent but
not yet sent to be sent, as that stuff should only be sent by
- our parent). */
- _exit(2);
+ our parent). We've sent an error message to the parent, so
+ we exit with an exit status of 1 (any exit status other than
+ 0 or 1 will cause an additional message to report that exit
+ status, over and above the error message we sent to the parent). */
+ _exit(1);
}
*read_fd = sync_pipe[PIPE_READ];