aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-03-19 23:09:58 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-03-19 23:09:58 +0000
commitb21f379639386c68c182e55ae61c6f1e80159c4d (patch)
tree922c3da9d2660b3a46f7ac2333eb79ddae047556 /shell/ash.c
parent653d8e79b21f39fa97c3043296e36971bb8ef555 (diff)
downloadbusybox-w32-b21f379639386c68c182e55ae61c6f1e80159c4d.tar.gz
busybox-w32-b21f379639386c68c182e55ae61c6f1e80159c4d.tar.bz2
busybox-w32-b21f379639386c68c182e55ae61c6f1e80159c4d.zip
ash: fix TRACE commands
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/shell/ash.c b/shell/ash.c
index a8383d805..d969b20a2 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -39,7 +39,7 @@
39 * When debugging is on, debugging info will be written to ./trace and 39 * When debugging is on, debugging info will be written to ./trace and
40 * a quit signal will generate a core dump. 40 * a quit signal will generate a core dump.
41 */ 41 */
42#define DEBUG 0 42#define DEBUG 2
43/* Tweak debug output verbosity here */ 43/* Tweak debug output verbosity here */
44#define DEBUG_TIME 0 44#define DEBUG_TIME 0
45#define DEBUG_PID 1 45#define DEBUG_PID 1
@@ -3834,7 +3834,8 @@ dowait(int wait_flags, struct job *job)
3834 * NB: _not_ safe_waitpid, we need to detect EINTR */ 3834 * NB: _not_ safe_waitpid, we need to detect EINTR */
3835 pid = waitpid(-1, &status, 3835 pid = waitpid(-1, &status,
3836 (doing_jobctl ? (wait_flags | WUNTRACED) : wait_flags)); 3836 (doing_jobctl ? (wait_flags | WUNTRACED) : wait_flags));
3837 TRACE(("wait returns pid=%d, status=0x%x\n", pid, status)); 3837 TRACE(("wait returns pid=%d, status=0x%x, errno=%d(%s)\n",
3838 pid, status, errno, strerror(errno)));
3838 if (pid <= 0) 3839 if (pid <= 0)
3839 return pid; 3840 return pid;
3840 3841
@@ -8003,7 +8004,7 @@ dotrap(void)
8003 want_exexit = evalstring(t, SKIPEVAL); 8004 want_exexit = evalstring(t, SKIPEVAL);
8004 exitstatus = savestatus; 8005 exitstatus = savestatus;
8005 if (want_exexit) { 8006 if (want_exexit) {
8006 TRACE(("dotrap returns %d\n", skip)); 8007 TRACE(("dotrap returns %d\n", want_exexit));
8007 return want_exexit; 8008 return want_exexit;
8008 } 8009 }
8009 } 8010 }
@@ -8051,11 +8052,13 @@ evaltree(union node *n, int flags)
8051 if (err) { 8052 if (err) {
8052 /* if it was a signal, check for trap handlers */ 8053 /* if it was a signal, check for trap handlers */
8053 if (exception_type == EXSIG) { 8054 if (exception_type == EXSIG) {
8054 TRACE(("exception %d (EXSIG) in evaltree, err=%d\n", exception, err)); 8055 TRACE(("exception %d (EXSIG) in evaltree, err=%d\n",
8056 exception_type, err));
8055 goto out; 8057 goto out;
8056 } 8058 }
8057 /* continue on the way out */ 8059 /* continue on the way out */
8058 TRACE(("exception %d in evaltree, propagating err=%d\n", exception, err)); 8060 TRACE(("exception %d in evaltree, propagating err=%d\n",
8061 exception_type, err));
8059 exception_handler = savehandler; 8062 exception_handler = savehandler;
8060 longjmp(exception_handler->loc, err); 8063 longjmp(exception_handler->loc, err);
8061 } 8064 }