search for: fork_fg

Displaying 7 results from an estimated 7 matches for "fork_fg".

2019 Jan 25
0
[klibc:update-dash] jobs - Do not block when waiting on SIGCHLD
...14 insertions(+), 11 deletions(-) diff --git a/usr/dash/eval.c b/usr/dash/eval.c index 2f662e3e..56661880 100644 --- a/usr/dash/eval.c +++ b/usr/dash/eval.c @@ -859,10 +859,8 @@ bail: if (!(flags & EV_EXIT) || have_traps()) { INTOFF; jp = makejob(cmd, 1); - if (forkshell(jp, cmd, FORK_FG) != 0) { - INTON; + if (forkshell(jp, cmd, FORK_FG) != 0) break; - } FORCEINTON; } listsetvar(varlist.list, VEXPORT|VSTACK); @@ -875,11 +873,8 @@ bail: if (execcmd && argc > 1) listsetvar(varlist.list, VEXPORT); } - if (evalbltin(cmdentry.u.cmd, argc, a...
2020 Mar 28
0
[klibc:update-dash] dash: jobs - Do not block when waiting on SIGCHLD
...14 insertions(+), 11 deletions(-) diff --git a/usr/dash/eval.c b/usr/dash/eval.c index 722066e5..13e690e7 100644 --- a/usr/dash/eval.c +++ b/usr/dash/eval.c @@ -859,10 +859,8 @@ bail: if (!(flags & EV_EXIT) || have_traps()) { INTOFF; jp = makejob(cmd, 1); - if (forkshell(jp, cmd, FORK_FG) != 0) { - INTON; + if (forkshell(jp, cmd, FORK_FG) != 0) break; - } FORCEINTON; } listsetvar(varlist.list, VEXPORT|VSTACK); @@ -875,11 +873,8 @@ bail: if (execcmd && argc > 1) listsetvar(varlist.list, VEXPORT); } - if (evalbltin(cmdentry.u.cmd, argc, a...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add vfork support
.../usr/dash/eval.c b/usr/dash/eval.c index 77a8bded..7bb636e1 100644 --- a/usr/dash/eval.c +++ b/usr/dash/eval.c @@ -892,10 +892,8 @@ bail: /* Fork off a child process if necessary. */ if (!(flags & EV_EXIT) || have_traps()) { INTOFF; - jp = makejob(cmd, 1); - if (forkshell(jp, cmd, FORK_FG) != 0) - break; - FORCEINTON; + jp = vforkexec(cmd, argv, path, cmdentry.u.index); + break; } shellexec(argv, path, cmdentry.u.index); /* NOTREACHED */ diff --git a/usr/dash/exec.h b/usr/dash/exec.h index 2b318257..423b07e6 100644 --- a/usr/dash/exec.h +++ b/usr/dash/exec.h @@ -58...
2019 Jan 25
0
[klibc:update-dash] eval: Reap zombies after built-in commands and functions
....c index 6ba64b12..811c28a4 100644 --- a/usr/dash/eval.c +++ b/usr/dash/eval.c @@ -848,6 +848,8 @@ bail: goto out; } + jp = NULL; + /* Execute the command. */ switch (cmdentry.cmdtype) { default: @@ -856,7 +858,6 @@ bail: INTOFF; jp = makejob(cmd, 1); if (forkshell(jp, cmd, FORK_FG) != 0) { - status = waitforjob(jp); INTON; break; } @@ -875,22 +876,22 @@ bail: if (evalbltin(cmdentry.u.cmd, argc, argv, flags)) { if (exception == EXERROR && spclbltin <= 0) { FORCEINTON; - goto readstatus; + break; } raise: longjmp(handler-&...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Reap zombies after built-in commands and functions
....c index a679ba31..26055493 100644 --- a/usr/dash/eval.c +++ b/usr/dash/eval.c @@ -848,6 +848,8 @@ bail: goto out; } + jp = NULL; + /* Execute the command. */ switch (cmdentry.cmdtype) { default: @@ -856,7 +858,6 @@ bail: INTOFF; jp = makejob(cmd, 1); if (forkshell(jp, cmd, FORK_FG) != 0) { - status = waitforjob(jp); INTON; break; } @@ -875,22 +876,22 @@ bail: if (evalbltin(cmdentry.u.cmd, argc, argv, flags)) { if (exception == EXERROR && spclbltin <= 0) { FORCEINTON; - goto readstatus; + break; } raise: longjmp(handler-&...
2019 Jan 25
0
[klibc:update-dash] eval: Return status in eval functions
...86,7 @@ parse_command_args(char **argv, const char **path) * Execute a simple command. */ -STATIC void +STATIC int #ifdef notyet evalcommand(union node *cmd, int flags, struct backcmd *backcmd) #else @@ -849,7 +856,7 @@ bail: INTOFF; jp = makejob(cmd, 1); if (forkshell(jp, cmd, FORK_FG) != 0) { - exitstatus = waitforjob(jp); + status = waitforjob(jp); INTON; break; } @@ -868,17 +875,19 @@ bail: if (evalbltin(cmdentry.u.cmd, argc, argv, flags)) { if (exception == EXERROR && spclbltin <= 0) { FORCEINTON; - break; + goto readstatus;...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Return status in eval functions
...86,7 @@ parse_command_args(char **argv, const char **path) * Execute a simple command. */ -STATIC void +STATIC int #ifdef notyet evalcommand(union node *cmd, int flags, struct backcmd *backcmd) #else @@ -849,7 +856,7 @@ bail: INTOFF; jp = makejob(cmd, 1); if (forkshell(jp, cmd, FORK_FG) != 0) { - exitstatus = waitforjob(jp); + status = waitforjob(jp); INTON; break; } @@ -868,17 +875,19 @@ bail: if (evalbltin(cmdentry.u.cmd, argc, argv, flags)) { if (exception == EXERROR && spclbltin <= 0) { FORCEINTON; - break; + goto readstatus;...