[uClibc]strace of uClibc/busybox ctrl+c problem

Erik Andersen andersen at codepoet.org
Wed Jan 9 12:19:24 UTC 2002


On Wed Jan 09, 2002 at 12:50:40PM +0100, Giulio Orsero wrote:
> This refers to 
> http://uclibc.org/lists/busybox/2001-December/010699.html
> 
> 
> busybox linked to uClibc
> problem is not related to "more", "more" is just a test case.
> 
> strace -F -ff -o myfile busybox ash
> ./busybox more /etc/hosts
> <ctrl+c>

Cool, thanks for the traces.

> ending lines of strace of busybox more
> ===
> write(1, "--More-- (15% of 3071 bytes)", 28) = 28
> read(4, 0x8085000, 512)                 = ? ERESTARTSYS (To be restarted)
> --- SIGINT (Interrupt) ---
> write(1, "\n", 1)                       = 1
> ioctl(4, SNDCTL_TMR_START, {B9600 opost isig icanon echo ...}) = 0
> ioctl(4, TCGETS, {B9600 opost isig icanon echo ...}) = 0
> _exit(1)
> ===

This looks just like it should look.  It got a SIGINT when you
hit ^C, then cleaned up after itself and exited.  So far so
good...

> ending lines of strace of busybox ash
[-----------snip-------------------]
> fork()                                  = 29623
> wait4(-1, 0xbffff27c, 0, NULL) = ? ERESTARTSYS (To be restarted)
> --- SIGINT (Interrupt) ---
> sigreturn()                             = ? (mask now [])
> wait4(-1, [WIFEXITED(s) && WEXITSTATUS(s) == 1], 0, NULL) = 29623
> --- SIGCHLD (Child exited) ---
> rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
> --- SIGSEGV (Segmentation fault) ---
> +++ killed by SIGSEGV +++

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
the choice whether to enable job control into the config file.

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--



More information about the uClibc mailing list