search for: setjobctl

Displaying 8 results from an estimated 8 matches for "setjobctl".

2010 Apr 02
2
(fwd) dash fix for job control off warning
...ms to be a problem with the new version of dash with job control off. I can't tell if it is just a warning or is a manifest bug. The solution is simple: --- a/usr/dash/jobs.h +++ b/usr/dash/jobs.h @@ -105,5 +105,5 @@ int waitforjob(struct job *); int stoppedjobs(void); #if ! JOBS -#define setjobctl(on) /* do nothing */ +#define setjobctl(on) ((void)(on)) /* do nothing */ #endif ... to keep the code syntactically valid even when setjobctl() is used as the body of an if statement. -hpa ----- End forwarded message ----- -- maks
2010 Apr 06
1
[patch v2] dash fix for job control off warning
...usr/dash/trap.c: In function `exitshell': usr/dash/trap.c:376: warning: suggest braces around empty body in an `if' statement The solution is simple: --- a/usr/dash/jobs.h +++ b/usr/dash/jobs.h @@ -105,5 +105,5 @@ int waitforjob(struct job *); int stoppedjobs(void); #if ! JOBS -#define setjobctl(on) /* do nothing */ +#define setjobctl(on) ((void)(on)) /* do nothing */ #endif ... to keep the code syntactically valid even when setjobctl() is used as the body of an if statement. -hpa ----- End forwarded message ----- -- maks
2010 Mar 28
1
[git pull v3] dash, sh4, ipconfig, dprintf, fstype, README's
hello hpa! added on top of queue ext4 fix, that Ubuntu is carrying from cjwatson. Got missed out in previous pull requests. Btrfs recognition in fstype. the patch queue contains sync with latest dash, sh4 fix by Debian porters, dprintf usage in ipconfig, kinit and nfsmount instead of buggy DEBUG macro. ipconfig memcpy usage to avoid strict aliasing warnings. Some interesting README's got
2020 Mar 28
0
[klibc:update-dash] dash: eval: Only restore exit status on exit/return
...397,10 @@ exitshell(void) trap[0] = NULL; evalskip = 0; evalstring(p, 0); + evalskip = SKIPFUNCDEF; } out: + exitreset(); /* * Disable job control so that whoever had the foreground before we * started can get it back. @@ -405,7 +408,7 @@ out: if (likely(!setjmp(loc.loc))) setjobctl(0); flushall(); - _exit(savestatus); + _exit(exitstatus); /* NOTREACHED */ }
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Exit without arguments in a trap should use status outside traps
...on == EXEXIT) - status = exitstatus; + savestatus = exitstatus; + TRACE(("pid %d, exitshell(%d)\n", getpid(), savestatus)); + if (setjmp(loc.loc)) goto out; - } handler = &loc; if ((p = trap[0])) { trap[0] = NULL; @@ -398,7 +401,7 @@ out: if (likely(!setjmp(loc.loc))) setjobctl(0); flushall(); - _exit(status); + _exit(savestatus); /* NOTREACHED */ }
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Exit without arguments in a trap should use status outside traps
...on == EXEXIT) - status = exitstatus; + savestatus = exitstatus; + TRACE(("pid %d, exitshell(%d)\n", getpid(), savestatus)); + if (setjmp(loc.loc)) goto out; - } handler = &loc; if ((p = trap[0])) { trap[0] = NULL; @@ -398,7 +401,7 @@ out: if (likely(!setjmp(loc.loc))) setjobctl(0); flushall(); - _exit(status); + _exit(savestatus); /* NOTREACHED */ }
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add vfork support
...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 showjobs(struct output *, int); int waitcmd(int, char **); struct job *makejob(union node *, int); int forkshell(struct job *, union node *, int); +struct job *vforkexec(union node *n, char **argv, const char *path, int idx); int waitfo...
2007 Aug 23
0
[git patch] klibc dash 0.5.4 update
...- fd2 = copyfd(fd, 10); - close(fd); - fd = fd2; - } + if (fd < 10) + fd = savefd(fd); setinputfd(fd, flags & INPUT_PUSH_FILE); out: INTON; diff --git a/usr/dash/jobs.c b/usr/dash/jobs.c index 77ed779..7e38048 100644 --- a/usr/dash/jobs.c +++ b/usr/dash/jobs.c @@ -188,18 +188,14 @@ setjobctl(int on) if (on == jobctl || rootshell == 0) return; if (on) { - int ofd; - ofd = fd = open(_PATH_TTY, O_RDWR); + fd = open(_PATH_TTY, O_RDWR); if (fd < 0) { fd += 3; - while (!isatty(fd) && --fd >= 0) - ; + while (!isatty(fd)) + if (--fd < 0) + goto o...