NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/54743: sh(1) exits with code 127 by wait after trap



>Number:         54743
>Category:       bin
>Synopsis:       sh(1) exits with code 127 by wait after trap
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 07 05:45:00 +0000 2019
>Originator:     Iku Iwasa
>Release:        NetBSD 9.0 RC1
>Organization:
>Environment:
>Description:
With sh(1) on NetBSD 9.0 RC1, the following command exits with code 127.

```
$ sh -c 'sleep 604800 & sleep=$!; trap "exit 0" 15; wait $sleep'
```

It worked on NetBSD 8.1 and works with ksh(1), bash, zsh.

The above command is simplified version of what "with-editor" uses for remote host.
"with-editor" is an Emacs package that Magit (Emacs git interface https://magit.vc/) uses.
As a result, Magit does not work with remote NetBSD host unless the configuration is changed to use e.g. ksh(1).
>How-To-Repeat:
Run

$ sh -c 'sleep 604800 & sleep=$!; trap "exit 0" 15; wait $sleep'
>Fix:



Home | Main Index | Thread Index | Old Index