diff --git a/lib/utilunix.c b/lib/utilunix.c index 02f9114657..41e0b7115b 100644 --- a/lib/utilunix.c +++ b/lib/utilunix.c @@ -141,7 +141,7 @@ my_fork_state (void) { pid_t pid; - pid = fork (); + pid = my_fork (); if (pid < 0) { diff --git a/src/background.c b/src/background.c index ce727c4bd0..72a0eda73e 100644 --- a/src/background.c +++ b/src/background.c @@ -49,6 +49,7 @@ #include "lib/tty/key.h" /* add_select_channel(), delete_select_channel() */ #include "lib/widget.h" /* message() */ #include "lib/event-types.h" +#include "lib/util.h" /* my_fork() */ #include "filemanager/fileopctx.h" /* file_op_context_t */ @@ -535,7 +536,7 @@ do_background (file_op_context_t *ctx, char *info) return (-1); } - pid = fork (); + pid = my_fork (); if (pid == -1) { int saved_errno = errno; diff --git a/src/cons.handler.c b/src/cons.handler.c index 5f58a4271e..2a026960b8 100644 --- a/src/cons.handler.c +++ b/src/cons.handler.c @@ -154,7 +154,7 @@ handle_console_linux (console_action_t action) break; } /* Get the console saver running */ - cons_saver_pid = fork (); + cons_saver_pid = my_fork (); if (cons_saver_pid < 0) { /* Cannot fork */ diff --git a/src/subshell/common.c b/src/subshell/common.c index 72f0015690..c196865c00 100644 --- a/src/subshell/common.c +++ b/src/subshell/common.c @@ -1403,7 +1403,7 @@ init_subshell (void) subshell_alive = TRUE; subshell_stopped = FALSE; - subshell_pid = fork (); + subshell_pid = my_fork (); if (subshell_pid == -1) { diff --git a/src/vfs/shell/shell.c b/src/vfs/shell/shell.c index c0824fd606..b13fb9911f 100644 --- a/src/vfs/shell/shell.c +++ b/src/vfs/shell/shell.c @@ -426,7 +426,7 @@ shell_pipeopen (struct vfs_s_super *super, const char *path, const char *argv[]) if ((pipe (fileset1) < 0) || (pipe (fileset2) < 0)) vfs_die ("Cannot pipe(): %m."); - res = fork (); + res = my_fork (); if (res != 0) {