Package: ksh Version: 93u+20120801-2+b1 Severity: normal When I use 'set -m' is a non-interactive shell, ksh stops after each external command. For instance, with
ksh93 -c 'set -m; /bin/true; /bin/true; true' I need to type fg twice to make it terminate. $ ksh93 -c 'set -m; /bin/true; /bin/true; true' [1] + Stopped (tty output) ksh93 -c "set -m; /bin/true; /bin/true; true" $ fg ksh93 -c "set -m; /bin/true; /bin/true; true" [1] + Stopped (tty output) ksh93 -c "set -m; /bin/true; /bin/true; true" $ fg ksh93 -c "set -m; /bin/true; /bin/true; true" $ Note: The "true" at the end is there to prevent an optimization that would make ksh execute the last external command instead of forking and waiting for it (thus hiding the issue for the last command). POSIX[*] just says for option -m: This option shall be supported if the implementation supports the User Portability Utilities option. All jobs shall be run in their own process groups. Immediately before the shell issues a prompt after completion of the background job, a message reporting the exit status of the background job shall be written to standard error. If a foreground job stops, the shell shall write a message to standard error to that effect, formatted as described by the jobs utility. In addition, if a job changes status other than exiting (for example, if it stops for input or output or is stopped by a SIGSTOP signal), the shell shall write a similar message immediately prior to writing the next prompt. This option is enabled by default for interactive shells. [*] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#set -- System Information: Debian Release: 9.0 APT prefers unstable-debug APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 4.9.0-2-amd64 (SMP w/8 CPU cores) Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages ksh depends on: ii binfmt-support 2.1.6-2 ii libc6 2.24-10 ksh recommends no packages. ksh suggests no packages. -- no debconf information