aboutsummaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2024-10-28 13:50:59 +0000
committerRon Yorston <rmy@pobox.com>2024-10-28 13:50:59 +0000
commit1bdb630cc7b17ca69598bf47ef5ae1b6565c7207 (patch)
tree66d81c901b565934ea8a2d52c3ba153383a0aa29 /win32
parentb4684bee87cb4acf392f27003c702d6650eda469 (diff)
downloadbusybox-w32-1bdb630cc7b17ca69598bf47ef5ae1b6565c7207.tar.gz
busybox-w32-1bdb630cc7b17ca69598bf47ef5ae1b6565c7207.tar.bz2
busybox-w32-1bdb630cc7b17ca69598bf47ef5ae1b6565c7207.zip
ash: fix waiting for status of background job
The following has never worked properly in busybox-w32: $ my_func() { return 5; } $ my_func & sleep 1; wait $!; echo $? The expected result is that 'echo' should display '5'. Actual results used to be '0' and more recently have been '127'. The culprit was commit fa6f44ea72 (win32: ash: reimplement waitpid(-1)). When the status of a job changed its pid was set to -1, which flagged processes of interest to the implementation of waitpid(). This is no longer necessary as waitpid() now uses the process handle instead. There's therefore no need to overwrite the pid. (GitHub issue #470)
Diffstat (limited to 'win32')
0 files changed, 0 insertions, 0 deletions