Displaying 20 results from an estimated 78 matches for "exitstatus".
Did you mean:
wexitstatus
2019 Jan 25
0
[klibc:update-dash] eval: Return status in eval functions
...etstackmark(&smark);
status = 0;
- while ((n = parsecmd(0)) != NEOF) {
- evaltree(n, flags & ~(parser_eof() ? 0 : EV_EXIT));
+ for (; (n = parsecmd(0)) != NEOF; popstackmark(&smark)) {
+ int i;
+
+ i = evaltree(n, flags & ~(parser_eof() ? 0 : EV_EXIT));
if (n)
- status = exitstatus;
- popstackmark(&smark);
+ status = i;
+
if (evalskip)
break;
}
@@ -192,13 +194,13 @@ evalstring(char *s, int flags)
* exitstatus.
*/
-void
+int
evaltree(union node *n, int flags)
{
int checkexit = 0;
- void (*evalfn)(union node *, int);
+ int (*evalfn)(union node *, int);...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Return status in eval functions
...etstackmark(&smark);
status = 0;
- while ((n = parsecmd(0)) != NEOF) {
- evaltree(n, flags & ~(parser_eof() ? 0 : EV_EXIT));
+ for (; (n = parsecmd(0)) != NEOF; popstackmark(&smark)) {
+ int i;
+
+ i = evaltree(n, flags & ~(parser_eof() ? 0 : EV_EXIT));
if (n)
- status = exitstatus;
- popstackmark(&smark);
+ status = i;
+
if (evalskip)
break;
}
@@ -192,13 +194,13 @@ evalstring(char *s, int flags)
* exitstatus.
*/
-void
+int
evaltree(union node *n, int flags)
{
int checkexit = 0;
- void (*evalfn)(union node *, int);
+ int (*evalfn)(union node *, int);...
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Exit without arguments in a trap should use status outside traps
...4 files changed, 29 insertions(+), 13 deletions(-)
diff --git a/usr/dash/eval.c b/usr/dash/eval.c
index b384cb82..ccd5e0c0 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -74,6 +74,7 @@ static int funcline; /* starting line number of current function, or 0 if not i
char *commandname;
int exitstatus; /* exit status of last command */
int back_exitstatus; /* exit status of backquoted command */
+int savestatus = -1; /* exit status of last command outside traps */
#if !defined(__alpha__) || (defined(__GNUC__) && __GNUC__ >= 3)
@@ -114,6 +115,10 @@ INCLUDE "eval.h"...
[klibc:update-dash] dash: [BUILTIN] Exit without arguments in a trap should use status outside traps
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Exit without arguments in a trap should use status outside traps
...4 files changed, 29 insertions(+), 13 deletions(-)
diff --git a/usr/dash/eval.c b/usr/dash/eval.c
index 3e08e825..1c76d4c5 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -74,6 +74,7 @@ static int funcline; /* starting line number of current function, or 0 if not i
char *commandname;
int exitstatus; /* exit status of last command */
int back_exitstatus; /* exit status of backquoted command */
+int savestatus = -1; /* exit status of last command outside traps */
#if !defined(__alpha__) || (defined(__GNUC__) && __GNUC__ >= 3)
@@ -114,6 +115,10 @@ INCLUDE "eval.h"...
2019 Jan 22
4
usr/dash/eval.c:277:19: warning: logical not is only applied to the left hand side of comparison
? KLIBCCC usr/dash/eval.o
usr/dash/eval.c: In function 'evaltree':
usr/dash/eval.c:277:19: warning: logical not is only applied to the left
hand side of comparison [-Wlogical-not-parentheses]
?? if (!exitstatus == isor)
?????????????????? ^
Not sure what the fix should be:
?? if (!(exitstatus == isor))
Or
?? if ((!exitstatus) == isor)
Any idea ?
Christophe
2019 Jan 25
0
[klibc:update-dash] [ERROR] Set exitstatus in onint
...libs/klibc/klibc.git;a=commit;h=56fa2b43fb8101a800dc2b90216baa1e9ae024e0
Author: Herbert Xu <herbert at gondor.apana.org.au>
AuthorDate: Thu, 2 Oct 2014 21:07:55 +0800
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Fri, 25 Jan 2019 02:57:21 +0000
[klibc] [ERROR] Set exitstatus in onint
Currently the exit status when we receive SIGINT is set in evalcommand
which means that it doesn't always get set. For example, if you press
CTRL-C at the prompt of an interactive dash, the exit status is not
set to 130 as it is in many other Bourne shells.
This patch fixes this by...
2019 Jan 25
0
[klibc:update-dash] [EVAL] Do not clobber exitstatus in evalcommand
.../klibc.git;a=commit;h=1fc5f5a5a8704d47b71b01cc0ab734a4d2976d37
Author: Herbert Xu <herbert at gondor.apana.org.au>
AuthorDate: Fri, 3 Oct 2014 14:07:07 +0800
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Fri, 25 Jan 2019 02:57:21 +0000
[klibc] [EVAL] Do not clobber exitstatus in evalcommand
All originators of EXERROR have been setting the exitstatus for
a while now. So it is no longer appropriate to set it explicitly
in evalcommand.
In fact doing so may cause the original exitstatus to be lost.
Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
Signed-...
2020 Mar 28
0
[klibc:update-dash] dash: [ERROR] Set exitstatus in onint
...libc/klibc.git;a=commit;h=9cd6cb0f37d13b7b2152560c07f4d168d1c561e1
Author: Herbert Xu <herbert at gondor.apana.org.au>
AuthorDate: Thu, 2 Oct 2014 21:07:55 +0800
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Sat, 28 Mar 2020 21:42:54 +0000
[klibc] dash: [ERROR] Set exitstatus in onint
[ dash commit b4ce4120f87d89476b2d6ab31df43900d2f5ce89 ]
Currently the exit status when we receive SIGINT is set in evalcommand
which means that it doesn't always get set. For example, if you press
CTRL-C at the prompt of an interactive dash, the exit status is not
set to 130 as it...
2020 Mar 28
0
[klibc:update-dash] dash: [EVAL] Do not clobber exitstatus in evalcommand
....git;a=commit;h=e49a1160b58933c257c27603aa3d020daf8e0943
Author: Herbert Xu <herbert at gondor.apana.org.au>
AuthorDate: Fri, 3 Oct 2014 14:07:07 +0800
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Sat, 28 Mar 2020 21:42:54 +0000
[klibc] dash: [EVAL] Do not clobber exitstatus in evalcommand
[ dash commit 0d1fb088a4a16569260de4266d4bd359491c6bcd ]
All originators of EXERROR have been setting the exitstatus for
a while now. So it is no longer appropriate to set it explicitly
in evalcommand.
In fact doing so may cause the original exitstatus to be lost.
Signed-off-by:...
2006 Nov 04
0
open4-0.5.1
...uot;
stdin.close
ignored, status = Process::waitpid2 pid
puts "pid : #{ pid }"
puts "stdout : #{ stdout.read.strip }"
puts "stderr : #{ stderr.read.strip }"
puts "status : #{ status.inspect }"
puts "exitstatus : #{ status.exitstatus }"
harp: > ruby sample/simple.rb
pid : 17273
stdout : 42.out
stderr : 42.err
status : #<Process::Status: pid=17273,exited(0)>
exitstatus : 0
-----------------------------------------------------------------...
2006 Aug 07
0
open4-0.5.0
...uot;
stdin.close
ignored, status = Process::waitpid2 pid
puts "pid : #{ pid }"
puts "stdout : #{ stdout.read.strip }"
puts "stderr : #{ stderr.read.strip }"
puts "status : #{ status.inspect }"
puts "exitstatus : #{ status.exitstatus }"
harp: > ruby sample/simple.rb
pid : 17273
stdout : 42.out
stderr : 42.err
status : #<Process::Status: pid=17273,exited(0)>
exitstatus : 0
-----------------------------------------------------------------...
2006 Apr 19
0
open4-0.3.0
...uot;
stdin.close
ignored, status = Process::waitpid2 pid
puts "pid : #{ pid }"
puts "stdout : #{ stdout.read.strip }"
puts "stderr : #{ stderr.read.strip }"
puts "status : #{ status.inspect }"
puts "exitstatus : #{ status.exitstatus }"
harp: > ruby sample/simple.rb
pid : 17273
stdout : 42.out
stderr : 42.err
status : #<Process::Status: pid=17273,exited(0)>
exitstatus : 0
-----------------------------------------------------------------...
2006 Nov 01
0
fatal flaw in popen4 on windows? [WAS] Re: Nonblocking IO read (fwd)
...etopts opts
>
> ignore_exit_failure = getopt[ ''ignore_exit_failure'',
> getopt[''quiet'', false]
> ]
> ignore_exec_failure = getopt[ ''ignore_exec_failure'',
> !getopt[''raise'', true]
> ]
> exitstatus = getopt[ %w( exitstatus exit_status status ) ]
> stdin = getopt[ %w( stdin in i 0 ) << 0 ]
> stdout = getopt[ %w( stdout out o 1 ) << 1 ]
> stderr = getopt[ %w( stderr err e 2 ) << 2 ]
> pid = getopt[ ''pid'' ]
> timeout = g...
2020 Nov 09
4
[[PATCH v1 0/3] Fix clang build warnings
New clangs emit some warnings. The code isn't wrong, but should be updated to
prevent warning creep.
Bill Wendling (3):
[klibc] dash: shell: Fix clang warnings
[klibc] dash: shell: Fix clang warnings about format string
[klibc] Kbuild: use an enum to silence a clang warning
usr/dash/eval.c | 6 +++---
usr/dash/jobs.c | 2 +-
usr/kinit/nfsmount/dummypmap.c
2020 Mar 27
2
[PATCH v2 5/5] Clean up clang warnings
- Convert the "old style" GNU field designator extension to the new
style.
- Use proper indexing into a string literal.
- Use "%s" for the format string in "fmtstr".
- Add or remove casts of the "void *" argument of ioctl.
- Convert "if (!exitstatus == isor)" to "if ((!exitstatus) == isor)"
which retains the current semantics, but may not be what the
programmer intended.
Signed-off-by: Bill Wendling <morbo at google.com>
---
usr/dash/eval.c | 8 ++++----
usr/dash/jobs.c | 4 ++--
usr/dash/output.c...
2007 Jun 19
4
Changing the value of $?
Hi :)
Does anyone know of a way to set the value of $? ?
I have a test which stubs ` ; the call works fine, but then the library
I am testing checks the value of $? to see if the process terminated
correctly.
It seems not to be possible to assign $? directly...
For now I do this before my test :
`ls > /dev/null`
Which ensure that $? is zero ; but this is not a very nice way of doing
it !
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Return without arguments in a trap should use status outside traps
...return e;
}
@@ -1047,12 +1047,23 @@ breakcmd(int argc, char **argv)
int
returncmd(int argc, char **argv)
{
+ int skip;
+ int status;
+
/*
* If called outside a function, do what ksh does;
* skip the rest of the file.
*/
- evalskip = SKIPFUNC;
- return argv[1] ? number(argv[1]) : exitstatus;
+ if (argv[1]) {
+ skip = SKIPFUNC;
+ status = number(argv[1]);
+ } else {
+ skip = SKIPFUNCDEF;
+ status = exitstatus;
+ }
+ evalskip = skip;
+
+ return status;
}
diff --git a/usr/dash/eval.h b/usr/dash/eval.h
index 6e62137a..6e8acdaf 100644
--- a/usr/dash/eval.h
+++ b/usr/dash/eval.h
@@...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Return without arguments in a trap should use status outside traps
...return e;
}
@@ -1047,12 +1047,23 @@ breakcmd(int argc, char **argv)
int
returncmd(int argc, char **argv)
{
+ int skip;
+ int status;
+
/*
* If called outside a function, do what ksh does;
* skip the rest of the file.
*/
- evalskip = SKIPFUNC;
- return argv[1] ? number(argv[1]) : exitstatus;
+ if (argv[1]) {
+ skip = SKIPFUNC;
+ status = number(argv[1]);
+ } else {
+ skip = SKIPFUNCDEF;
+ status = exitstatus;
+ }
+ evalskip = skip;
+
+ return status;
}
diff --git a/usr/dash/eval.h b/usr/dash/eval.h
index 6e62137a..6e8acdaf 100644
--- a/usr/dash/eval.h
+++ b/usr/dash/eval.h
@@...
2010 Aug 04
1
[3.4.8/Debian Testing amd64] dpkg-build-package fails with linker error
...ind-ptrace.a:
could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [bin/smbcontrol] Fehler 1
make[1]: Leaving directory
`/root/201008042116-samba-3.4.8dfsg2-testing/source3'
make: *** [build-stamp] Fehler 2
dpkg-buildpackage: Fehler: debian/rules build gab Fehler-Exitstatus 2
turing:~/201008042116-samba-3.4.8dfsg2-testing#
===
The same procedure did work flawless last time when I did it with
3.4.5dfsg1.
Command used to build packages: "dpkg-buildpackage -uc -us -rfakeroot"
==
I found I need to add the "format=1.0" option now because otherwise a...
2019 Jan 25
0
[klibc:update-dash] eval: Fix exit status when calling eval/dot with no commands
...)
diff --git a/usr/dash/eval.c b/usr/dash/eval.c
index db7639a4..ef6ec0ef 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -172,7 +172,8 @@ evalstring(char *s, int flags)
status = 0;
while ((n = parsecmd(0)) != NEOF) {
evaltree(n, flags & ~(parser_eof() ? 0 : EV_EXIT));
- status = exitstatus;
+ if (n)
+ status = exitstatus;
popstackmark(&smark);
if (evalskip)
break;
diff --git a/usr/dash/main.c b/usr/dash/main.c
index bedb6635..497ac160 100644
--- a/usr/dash/main.c
+++ b/usr/dash/main.c
@@ -228,7 +228,8 @@ cmdloop(int top)
job_warning = (job_warning == 2) ? 1 : 0;...