Package: dash Version: 0.5.5.1-3 Severity: normal I've discovered a situation in which "wait $pid" exits before process $pid has terminated. Maybe EINTR is not being handled when calling wait()? Here's a script to reproduce it:
#!/bin/sh # # This script illustrates an anomaly when trapping SIGTSTP and waiting # for a child to exit. When the suspend key is pressed, the background # process is stopped (to see this run ps -lp <pid> in another window). # Then, when the TSTP handler finishes (after you press the Enter key), # the background process is continued (why?) and the wait command exits # (why?). This happens in both bash and dash, but I don't see anything # in the POSIX spec to support this behavior. I expect the background # process to remain stopped. Regardless of whether the background # process stays stopped or continues, I expect the wait command to keep # waiting until the background process terminates. # trap 'read junk' TSTP sleep 60 & pid=$! echo background process ID: $pid wait $pid echo wait exited with status=$? -- System Information: Debian Release: squeeze/sid APT prefers testing APT policy: (900, 'testing'), (800, 'stable'), (600, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.26-2-686 (SMP w/1 CPU core) Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1) Shell: /bin/sh linked to /bin/bash Versions of packages dash depends on: ii debianutils 3.2 Miscellaneous utilities specific t ii dpkg 1.15.3.1 Debian package management system ii libc6 2.9-12 GNU C Library: Shared libraries dash recommends no packages. dash suggests no packages. -- debconf information: dash/sh: false -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org