search for: exitshel

Displaying 14 results from an estimated 14 matches for "exitshel".

Did you mean: exitshell
2020 Mar 28
0
[klibc:update-dash] dash: mkinit: Split reset into exitreset and reset
...; AuthorDate: Sat, 19 May 2018 02:39:40 +0800 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sat, 28 Mar 2020 21:42:55 +0000 [klibc] dash: mkinit: Split reset into exitreset and reset [ dash commit 983085923ae1d45196868b48f576b1a19e03e72b ] Previously reset was called after exitshell. This was changed so that it was called before exitshell because certain state needed to be reset in order for the EXIT trap to work. However, this caused issues because certain other states (such as local variables) should not be reset. This patch fixes this by creating a new function exitrese...
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Exit without arguments in a trap should use status outside traps
...us < 0)) { + status = exitstatus; + savestatus = status; + } pendingsigs = 0; barrier(); @@ -337,8 +342,10 @@ void dotrap(void) if (!p) continue; evalstring(p, 0); - exitstatus = savestatus; + exitstatus = status; } + + savestatus = last_status; } @@ -372,18 +379,14 @@ exitshell(void) { struct jmploc loc; char *p; - volatile int status; #ifdef HETIO hetio_reset_term(); #endif - status = exitstatus; - TRACE(("pid %d, exitshell(%d)\n", getpid(), status)); - if (setjmp(loc.loc)) { - if (exception == EXEXIT) - status = exitstatus; + savestatus = exitst...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Exit without arguments in a trap should use status outside traps
...us < 0)) { + status = exitstatus; + savestatus = status; + } pendingsigs = 0; barrier(); @@ -337,8 +342,10 @@ void dotrap(void) if (!p) continue; evalstring(p, 0); - exitstatus = savestatus; + exitstatus = status; } + + savestatus = last_status; } @@ -372,18 +379,14 @@ exitshell(void) { struct jmploc loc; char *p; - volatile int status; #ifdef HETIO hetio_reset_term(); #endif - status = exitstatus; - TRACE(("pid %d, exitshell(%d)\n", getpid(), status)); - if (setjmp(loc.loc)) { - if (exception == EXEXIT) - status = exitstatus; + savestatus = exitst...
2010 Apr 02
2
(fwd) dash fix for job control off warning
----- Forwarded message from "H. Peter Anvin" <hpa at zytor.com> ----- Date: Mon, 29 Mar 2010 15:07:01 -0700 From: "H. Peter Anvin" <hpa at zytor.com> To: maximilian attems <max at stro.at> Cc: Colin Watson <cjwatson at ubuntu.com>, klibc at zytor.com, Herbert Xu <herbert at gondor.apana.org.au>, Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
2010 Oct 19
3
[PATCH] Fix up 3 klibc build warnings.
...klibc/scripts/basic/fixdep.c:370: warning: dereferencing type-punned pointer will break strict-aliasing rules klibc/usr/dash/jobs.c: In function 'sprint_status': klibc/usr/dash/jobs.c:427: warning: format not a string literal and no format arguments klibc/usr/dash/trap.c: In function 'exitshell': klibc/usr/dash/trap.c:354: warning: variable 'status' might be clobbered by 'longjmp' or 'vfork' Signed-off-by: Maciej ?enczykowski <maze at google.com> --- scripts/basic/fixdep.c | 9 ++++++--- usr/dash/jobs.c | 2 +- usr/dash/trap.c |...
2010 Apr 06
1
[patch v2] dash fix for job control off warning
...ana.org.au>, Nobuhiro Iwamatsu <iwamatsu at nigauri.org> Subject: Re: [klibc] dash fix for job control off warning There seems 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. 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 */ +#defi...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Only restore exit status on exit/return
...b/usr/dash/main.c index 6d53e009..6b3a0909 100644 --- a/usr/dash/main.c +++ b/usr/dash/main.c @@ -111,7 +111,7 @@ main(int argc, char **argv) e = exception; s = state; - if (e == EXEXIT || s == 0 || iflag == 0 || shlvl) + if (e == EXEND || e == EXEXIT || s == 0 || iflag == 0 || shlvl) exitshell(); reset(); diff --git a/usr/dash/trap.c b/usr/dash/trap.c index 1ad27e99..838008d2 100644 --- a/usr/dash/trap.c +++ b/usr/dash/trap.c @@ -42,6 +42,7 @@ #include "main.h" #include "nodes.h" /* for other headers */ #include "eval.h" +#include "init.h"...
2019 Jan 25
0
[klibc:update-dash] input: Remove HETIO
...= read(fd, &c, 1)) < 1) - return ret; - - switch (c) { - case 1: /* Control-A Beginning of line */ - input_home(&cursor); - break; - case 5: /* Control-E EOL */ - input_end(&cursor, len); - break; - case 4: /* Control-D */ - if (!len) - exitshell(0); - break; - case 21: /* Control-U */ - /* Return to begining of line. */ - for (; cursor > 0; cursor--) - out1c('\b'); - /* Erase old command. */ - for (j = 0; j < len; j++) { - /* - * Clear buffer while we're at - * it. - */...
2020 Mar 28
0
[klibc:update-dash] dash: input: Remove HETIO
...= read(fd, &c, 1)) < 1) - return ret; - - switch (c) { - case 1: /* Control-A Beginning of line */ - input_home(&cursor); - break; - case 5: /* Control-E EOL */ - input_end(&cursor, len); - break; - case 4: /* Control-D */ - if (!len) - exitshell(0); - break; - case 21: /* Control-U */ - /* Return to begining of line. */ - for (; cursor > 0; cursor--) - out1c('\b'); - /* Erase old command. */ - for (j = 0; j < len; j++) { - /* - * Clear buffer while we're at - * it. - */...
2020 Mar 28
0
[klibc:update-dash] dash: main: Only set savestatus in exitcmd
...klibc] dash: main: Only set savestatus in exitcmd [ dash commit d17dacd0f0499a8c77d810e211e8ff96b8898c48 ] Currently exitcmd sets exitstatus and then savestatus if the latter was previously set. In fact, as exitcmd always raises an exception and will either end up in the setjmp call in main() or exitshell(), where exitstatus is always replaced by savestatus if set, we only need to set savestatus. Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au> Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/dash/main.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletio...
2004 Oct 18
0
Error building ash: trap.c:398: error: conflicting types for 'onsig'
...p.h.old 2004-10-19 00:04:21.021269720 +0000 +++ ash/trap.h 2004-10-19 00:04:37.218807320 +0000 @@ -40,7 +40,7 @@ void clear_traps(int); long setsignal(int, int); void ignoresig(int, int); -void onsig(int); +__cdecl void onsig(int); void dotrap(void); void setinteractive(int); void exitshell(int) __attribute__((__noreturn__)); Daniel Thaler
2010 Mar 22
0
latest dash compile warnings
Seeing this in synced dash KLIBCCC usr/dash/trap.o usr/dash/trap.c: In function ?exitshell?: usr/dash/trap.c:376: warning: suggest braces around empty body in an ?if? statement usr/dash/trap.c:352: warning: variable ?status? might be clobbered by ?longjmp? or ?vfork? anything else is clean. gcc --version gcc (Debian 4.4.2-9) 4.4.3 20100108 (prerelease)
2011 Jun 14
0
klibc 1.5.23 release
...g [klibc] [EXPAND] Free IFS state after here document expansion [klibc] [DEBUG] Use va_copy when reusing a va_list Konstantinos Margaritis (1): [klibc] arm: use conditional assignments for CPU_{ARCH,TUNE} Maciej ?enczykowski (1): [klibc] [SIGNAL] Mark status as volatile in exitshell Matthias Klose (1): [klibc] ppc64: Fix build failure with stricter as maximilian attems (7): [klibc] 1.5.22 released, next version is 1.5.23 [klibc] [JOBS] Debug compile fix [klibc] dash merge update [klibc] limits.h define LLONG_MIN, LLONG_MAX and ULLONG_MAX...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add vfork support
...t(&mask); + sigprocmask(SIG_SETMASK, &mask, oldmask); +} + /* * Human-readable signal name */ diff --git a/usr/dash/trap.h b/usr/dash/trap.h index a095b0e1..bbff1842 100644 --- a/usr/dash/trap.h +++ b/usr/dash/trap.h @@ -50,6 +50,7 @@ void dotrap(void); void setinteractive(int); void exitshell(void) __attribute__((__noreturn__)); int decode_signal(const char *, int); +void sigblockall(sigset_t *oldmask); const char *signal_name(int); static inline int have_traps(void)