16 lines
683 B
Diff
16 lines
683 B
Diff
Upstream report: https://bitbucket.org/tildeslash/monit/issues/867/invalid-use-of-vfork-in-command_execute
|
|
|
|
diff --git a/libmonit/src/system/Command.c b/libmonit/src/system/Command.c
|
|
index a17fde4..2c75fe4 100644
|
|
--- a/libmonit/src/system/Command.c
|
|
+++ b/libmonit/src/system/Command.c
|
|
@@ -497,7 +497,7 @@ Process_T Command_execute(T C) {
|
|
Process_T P = _Process_new();
|
|
int descriptors = System_getDescriptorsGuarded();
|
|
_createPipes(P);
|
|
- if ((P->pid = vfork()) < 0) {
|
|
+ if ((P->pid = fork()) < 0) {
|
|
ERROR("Command: fork failed -- %s\n", System_getLastError());
|
|
Process_free(&P);
|
|
return NULL;
|