id summary reporter owner description type status priority milestone component version resolution keywords cc blockedby blocking branch_state votes 9 savannah: Child process signal handling luk "Original: http://savannah.gnu.org/bugs/?11984 ||Submitted by:||Lukas Jelinek ||Submitted on:||Mon 14 Feb 2005 09:45:45 AM UTC|| ||Category:||Subshell||Severity:||3 - Normal|| ||Status:||None||Privacy:||Public|| ||Assigned to:||None||Open/Closed:||Open|| Release:||4.5.55||Operating System:||GNU/Linux|| Original submission: {{{ If I stop a child process (executed from MC) using SIGSTOP, there is no way how to resume this process again (SIGCONT has no effect). I don't know whether this is a bug or a ""feature"". Please review this. }}} Comment 1 by Pavel Tsekov at Wed 16 Feb 2005 02:13:45 PM UTC: {{{ This is not exactly a bug, but I'd say a side effect. Since you don't mention which program do you start from MC i have to assume that it is a program which writes its output to the terminal. Now, when the subshell feature is enabled commands are executed through the subshell. The shell being run when the subshell feature is enabled is a shell that has JOB CONTROL enabled. So when you stop the process it is put in the background and the shell gains control over the terminal. Switching from MC to the subshell causes certain terminal settings to change - one of them being the TOSTOP flag. Here is what the libc manual has to say about the TOSTOP flag: [...] Similarly, when a process in a background job tries to write to its controlling terminal, the default behavior is to send a `SIGTTOU' signal to the process group. However, the behavior is modified by the `TOSTOP' bit of the local modes flags (*note Local Modes::). If this bit is not set (which is the default), then writing to the controlling terminal is always permitted without sending a signal. Writing is also permitted if the `SIGTTOU' signal is being ignored or blocked by the writing process. [...] So when you send the SIGCONT signal to the stopped process it starts writing to the terminal again but it is stopped and sent the SIGTTOU signal. Now, one way to achieve what I guess you expect to happen is to disable the job control when executing commands typed in the shell prompt widget and th e subshell feature is enabled. You can test if this is what you expect by doing this: 1) Run MC 2) Ctrl + O 3) set +m 4) Ctrl + O 4) ls -lR / (or some other command taking time) 5) from another shell 'kill -STOP pid_of_ls' 6) from another shell 'kill -CONT pid_of_ls' }}} " defect new minor Future Releases mc-core master ossi@… no branch