NetBSD-Bugs archive

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

kern/52342: linux ABI exit(non-zero) returns zero status to the parent process



>Number:         52342
>Category:       kern
>Synopsis:       linux ABI exit(non-zero) returns zero status to the parent process
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 26 08:05:00 +0000 2017
>Originator:     u-bc8k
>Release:        7.1
>Organization:
Aetey
>Environment:
NetBSD XXXX 7.1 NetBSD 7.1 (GENERIC.201703111743Z) amd64
>Description:
/a/linux-i386/binary/doing/syscall/exit_1; echo "$?"

prints "0"

(ktrace shows "CALL  exit(1)" as the last syscall from the linux binary)

The most visible practical outcome is that shell scripts break.

>How-To-Repeat:
/a/linux-i386/binary/doing/syscall/exit_1; echo "$?"

It does not seem to make a difference whether the parent (the shell) is a native (NetBSD amd64) or a Linux i386 binary.

Not tested with 64-bit linux binaries.

>Fix:



Home | Main Index | Thread Index | Old Index