blob: b5c26a202ebd3cf1cc85857c7a87a8128ff112e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
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;
|