-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A few job control (-m, -o monitor) fixes (rhbz#960034)
This patch from Red Hat fixes the following: 1. ksh was ignoring the -m (-o monitor) option when specified on the invocation command line. 2. Scripts did not properly terminate their background processes on Ctrl+C if the -m option was turned off. Reproducer: xterm & read junk When run as a script without turning on -m, pressing Ctrl+C should terminate the xterm, and now does. 3. Scripts no longer attempt to set the terminal foreground process group ID, as only interactive shells should be doing that. This makes some progress on #119 but we're a long way from fixing all of that. src/cmd/ksh93/sh/main.c: exfile(): - On non-interactive shells, do not turn off the monitor option. Instead, if it was turned on, turn on the SH_MONITOR state flag. src/cmd/ksh93/edit/edit.c: ed_getchar(): - On Ctrl+C, issue SIGINT to the current process group using killpg(2) instead of going via sh_fault(), which handles a signal only for the current shell process. src/cmd/ksh93/sh/jobs.c: job_reap(), job_reset(), src/cmd/ksh93/sh/xec.c: sh_exec(): - Only attempt to set the terminal foreground process group ID using tcsetpgrp(3) if the shell is interactive. Original patch: https://src.fedoraproject.org/rpms/ksh/blob/642af4d6/f/ksh-20120801-kshmfix.patch This was applied to Red Hat's ksh 93u+ on 8 July 2013.
- Loading branch information
Showing
6 changed files
with
17 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters