projects
/
gnulib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
06a2906
)
Add an assertion.
author
Bruno Haible
<bruno@clisp.org>
Tue, 10 Jun 2008 11:57:21 +0000
(13:57 +0200)
committer
Bruno Haible
<bruno@clisp.org>
Tue, 10 Jun 2008 11:57:21 +0000
(13:57 +0200)
ChangeLog
patch
|
blob
|
history
lib/wait-process.c
patch
|
blob
|
history
diff --git
a/ChangeLog
b/ChangeLog
index
585e59e
..
5269090
100644
(file)
--- a/
ChangeLog
+++ b/
ChangeLog
@@
-1,5
+1,9
@@
2008-06-10 Bruno Haible <bruno@clisp.org>
2008-06-10 Bruno Haible <bruno@clisp.org>
+ * lib/wait-process.c (wait_subprocess): Add an assertion.
+
+2008-06-10 Bruno Haible <bruno@clisp.org>
+
* lib/wait-process.c (wait_subprocess): Try to fix waitid() based code.
2008-06-10 Bruno Haible <bruno@clisp.org>
* lib/wait-process.c (wait_subprocess): Try to fix waitid() based code.
2008-06-10 Bruno Haible <bruno@clisp.org>
diff --git
a/lib/wait-process.c
b/lib/wait-process.c
index
e3086b4
..
e98c644
100644
(file)
--- a/
lib/wait-process.c
+++ b/
lib/wait-process.c
@@
-1,5
+1,5
@@
/* Waiting for a subprocess to finish.
/* Waiting for a subprocess to finish.
- Copyright (C) 2001-2003, 2005-200
7
Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-200
8
Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
@@
-369,7
+369,8
@@
wait_subprocess (pid_t child, const char *progname,
}
/* One of WIFSIGNALED (status), WIFEXITED (status), WIFSTOPPED (status)
}
/* One of WIFSIGNALED (status), WIFEXITED (status), WIFSTOPPED (status)
- must always be true. Loop until the program terminates. */
+ must always be true, since we did not specify WCONTINUED in the
+ waitpid() call. Loop until the program terminates. */
if (!WIFSTOPPED (status))
break;
}
if (!WIFSTOPPED (status))
break;
}
@@
-394,6
+395,8
@@
wait_subprocess (pid_t child, const char *progname,
progname, (int) WTERMSIG (status));
return 127;
}
progname, (int) WTERMSIG (status));
return 127;
}
+ if (!WIFEXITED (status))
+ abort ();
if (WEXITSTATUS (status) == 127)
{
if (exit_on_error || !null_stderr)
if (WEXITSTATUS (status) == 127)
{
if (exit_on_error || !null_stderr)