[uClibc]strace of uClibc/busybox ctrl+c problem
Giulio Orsero
giulioo at pobox.com
Wed Jan 9 14:05:58 UTC 2002
On Wed, 9 Jan 2002 05:19:24 -0700, you wrote:
>Odd. ash never calls setpgid()... Wierd.
><reads ash source>
>Oh. It looks like in both busybox and busybox.stable
>trees, job control is disabled by default.
>
>Could you try one more test? Edit busybox/shells/ash.c
>or busybox.stable/ash.c (depending on which tree you
>are working from) and change
> - #undef JOBS
> + #define JOBS
>and let me know if that fixes it? If so, I think I'll move
Yes, this helps in some cases: now I can do "more ..." and ctrl+c correctly
returns to prompt.
===
read(0, "\4", 1) = 1
ioctl(0, SNDCTL_TMR_START, {B9600 opost isig icanon echo ...}) = 0
ioctl(0, TCGETS, {B9600 opost isig icanon echo ...}) = 0
rt_sigaction(SIGWINCH, {SIG_DFL}, {0x8064500, [], SA_RESTART}, 8) = 0
setpgid(0, 3073) = 0
ioctl(2, TIOCSPGRP, [3073]) = 0
_exit(1)
===
However, given the following script
===
#!./busybox ash
read key
echo $key
===
if you ctrl+c when it's prompting you get sigsev:
==== trace of script
getdents(4, /* 0 entries */, 4096) = 0
close(4) = 0
read(0, 0xbffff383, 1) = ? ERESTARTSYS (To be restarted)
--- SIGINT (Interrupt) ---
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL}, {0x80635d8, [], 0}, 8) = 0
getpid() = 3081
kill(3081, SIGINT) = 0
--- SIGINT (Interrupt) ---
==== trace of busybox ash
close(4) = 0
fork() = 3081
setpgid(3081, 3081) = 0
getpgrp() = 3080
wait4(-1, [WIFSIGNALED(s) && WTERMSIG(s) == SIGINT], WUNTRACED, NULL) = 3081
--- SIGCHLD (Child exited) ---
ioctl(2, TIOCSPGRP, [3080]) = 0
getpid() = 3080
kill(3080, SIGINT) = 0
--- SIGINT (Interrupt) ---
sigreturn() = ? (mask now [])
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
So is this just an ash problem?
--
giulioo at pobox.com
More information about the uClibc
mailing list