On Sun, 12 Sep 2010, Denys Vlasenko wrote:

> I definitely see current ash and hush to react to ^C at once.

I don't (after 'git pull')

> I also tested Rob's prebuilt busybox-i486 binary (v.1.17.2) from
> http://impactlinux.com/aboriginal/downloads/binaries/extras/
> Here is test runs:
>
> # ./busybox-i486 ash z
> running: z
> ^Cin : wrapper_func
> in : wrapper_func
> 1. : wrapper_func: listing traps
> trap -- 'wrapper_func' INT
> trap -- 'wrapper_func' TERM
> 2. : wrapper_func: removing traps
> 3. : wrapper_func: listing traps again
> in : other_func
> ls: cannot access /foo/bar/baz: No such file or directory
> out: other_func
> out: wrapper_func
> 1. : wrapper_func: listing traps
> 2. : wrapper_func: removing traps
> 3. : wrapper_func: listing traps again
> in : other_func
> ls: cannot access /foo/bar/baz: No such file or directory
> out: other_func
> out: wrapper_func

running: trap-test3.sh, pid: 23879
^Cin : wrapper_func
0. : wrapper_func: interrupted
1. : wrapper_func: traps list
trap -- 'wrapper_func' INT
trap -- 'wrapper_func' TERM
2.1: wrapper_func: INT trap removed
2.2: wrapper_func: TERM trap removed
3. : wrapper_func: listing traps again
in : other_func
ls: /foo/bar/baz: No such file or directory
out: other_func
out: wrapper_func
in : wrapper_func
0. : wrapper_func: interrupted
out: wrapper_func

Still not showing the EXIT trap and running twice, but behaves.

> # ./busybox-i486 hush z
> hush: set: -e: invalid option
> hush: set: -u: invalid option
> running: z
> ^C
> in : wrapper_func
> 1. : wrapper_func: listing traps
> trap -- 'wrapper_func' EXIT
> trap -- 'wrapper_func' INT
> trap -- 'wrapper_func' TERM
> 2. : wrapper_func: removing traps
> 3. : wrapper_func: listing traps again
> in : other_func
> ls: cannot access /foo/bar/baz: No such file or directory
> out: other_func
> out: wrapper_func

hush: set: -e: invalid option
hush: set: -u: invalid option
running: trap-test3.sh, pid: 23618
^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^Cin : wrapper_func
1. : wrapper_func: traps list
trap -- 'wrapper_func' EXIT
trap -- 'wrapper_func' INT
trap -- 'wrapper_func' TERM
2.1: wrapper_func: EXIT trap removed
2.2: wrapper_func: INT trap removed
2.3: wrapper_func: TERM trap removed
3. : wrapper_func: listing traps again
in : other_func
ls: /foo/bar/baz: No such file or directory
out: other_func
out: wrapper_func

Slightly modified test script, attached.  Still, SIGINT not catched, looks
like.  I even did a 'distclean' and rebuilt.

> # ./busybox-i486
> BusyBox v1.17.2 (2010-09-05 04:58:49 CDT) multi-call binary.
> ...

./busybox_unstripped
BusyBox v1.18.0.git (2010-09-12 18:25:22 CEST) multi-call binary.

> I don't see this in my experiments.

I do.  Wonder what the cause is.  I guess gcc is different:

gcc-4.4.real (Debian 4.4.4-14) 4.4.5 20100909 (prerelease)

> What version and .config do you use?

# Automatically generated make config: don't edit
# Busybox version: 1.18.0.git
# Sun Sep 12 18:25:22 2010


Cheers,

-- 
Cristian

Attachment: trap-test3.sh
Description: Bourne shell script

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to