search for: job_warn

Displaying 5 results from an estimated 5 matches for "job_warn".

Did you mean: rb_warn
2019 Jan 25
0
[klibc:update-dash] eval: Fix exit status when calling eval/dot with no commands
...that command as the exit status to be used by ".". I think the easiest way to fix this is to prevent null commands from affecting status in cmdloop, as attached. An alternative could be to change the outer if condition to exclude n == NULL, but I didn't do that because the change of job_warning and clearing of numeof make sense to me even for null commands. Besides, when debug tracing is enabled, null commands have a visible effect that should remain. Note that this fixes the problem with . but the same problem can be present in other locations. For example, false eval &quo...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Fix exit status when calling eval/dot with no commands
...that command as the exit status to be used by ".". I think the easiest way to fix this is to prevent null commands from affecting status in cmdloop, as attached. An alternative could be to change the outer if condition to exclude n == NULL, but I didn't do that because the change of job_warning and clearing of numeof make sense to me even for null commands. Besides, when debug tracing is enabled, null commands have a visible effect that should remain. Note that this fixes the problem with . but the same problem can be present in other locations. For example, false eval &quo...
2019 Jan 25
0
[klibc:update-dash] eval: Return status in eval functions
...oid evalbackcmd(union node *, struct backcmd *); extern int evalskip; diff --git a/usr/dash/main.c b/usr/dash/main.c index 497ac160..fcd3e7d2 100644 --- a/usr/dash/main.c +++ b/usr/dash/main.c @@ -225,11 +225,13 @@ cmdloop(int top) } numeof++; } else if (nflag == 0) { + int i; + job_warning = (job_warning == 2) ? 1 : 0; numeof = 0; - evaltree(n, 0); + i = evaltree(n, 0); if (n) - status = exitstatus; + status = i; } popstackmark(&smark);
2020 Mar 28
0
[klibc:update-dash] dash: eval: Return status in eval functions
...oid evalbackcmd(union node *, struct backcmd *); extern int evalskip; diff --git a/usr/dash/main.c b/usr/dash/main.c index 497ac160..fcd3e7d2 100644 --- a/usr/dash/main.c +++ b/usr/dash/main.c @@ -225,11 +225,13 @@ cmdloop(int top) } numeof++; } else if (nflag == 0) { + int i; + job_warning = (job_warning == 2) ? 1 : 0; numeof = 0; - evaltree(n, 0); + i = evaltree(n, 0); if (n) - status = exitstatus; + status = i; } popstackmark(&smark);
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add vfork support
...mask); diff --git a/usr/dash/jobs.h b/usr/dash/jobs.h index 953ee871..6ac6c56d 100644 --- a/usr/dash/jobs.h +++ b/usr/dash/jobs.h @@ -83,6 +83,8 @@ struct job { struct job *prev_job; /* previous job */ }; +union node; + extern pid_t backgndpid; /* pid of last background process */ extern int job_warning; /* user was warned about stopped jobs */ #if JOBS @@ -90,6 +92,7 @@ extern int jobctl; /* true if doing job control */ #else #define jobctl 0 #endif +extern int vforked; /* Set if we are in the vforked child */ void setjobctl(int); int killcmd(int, char **); @@ -101,6 +104,7 @@ void...