projects
/
mmh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c72e238
)
return -1 if fork(2) fails in execprog
author
Philipp Takacs
<philipp@bureaucracy.de>
Sun, 22 Feb 2015 22:26:38 +0000
(23:26 +0100)
committer
Philipp Takacs
<philipp@bureaucracy.de>
Sun, 22 Feb 2015 22:26:38 +0000
(23:26 +0100)
If fork in execprog fails and return 1 there is now
way to different between a proces witch return 1.
Thanks Marcin Cieslak <saper@saper.info> for reporting.
sbr/execprog.c
patch
|
blob
|
history
diff --git
a/sbr/execprog.c
b/sbr/execprog.c
index
ce38307
..
f1f03bc
100644
(file)
--- a/
sbr/execprog.c
+++ b/
sbr/execprog.c
@@
-16,7
+16,7
@@
execprog(char *cmd, char **arg)
case -1:
/* fork error */
advise("fork", "unable to");
- return 1;
+ return -1;
case 0:
/* child */
@@
-30,7
+30,7
@@
execprog(char *cmd, char **arg)
return pidXwait(pid, cmd);
}
- return 1; /* NOT REACHED */
+ return -1; /* NOT REACHED */
}