On 5/1/13 6:53 AM, cetteadressem...@free.fr wrote: > Machine Type: x86_64-unknown-linux-gnu > > Bash Version: 4.2 > Patch Level: 45 > Release Status: release > > Description: > I know this is something odd to do, I would like to start my windows > manager > from .bashrc. > If I do so and hit ctrl-z while bash is asking me for command line, the > job is > suspended. > I can't resume it : "bash: bg: job 1 started without job control"
Here's what happens: the startup files are run without job control enabled. All processes started when job control is not enabled are in the same process group as the shell itself, and do not ignore job control signals (SIGTTIN/SIGTTOU/SIGTSTP) so they can be controlled later. Since they are not in separate process groups, they can't be individually moved between the foreground and background using the set of job control builtins. The shell ignores SIGTSTP, so a ^Z from the command line won't suspend it inadvertently. Since keyboard-generated signals are sent to the terminal's foreground process group, the asynchronous job run from .bashrc receives the SIGTSTP and stops. You can send SIGCONT to the backgrounded process's pid to continue it. If you want to play around with your startup files, you can try starting the window manager in the background from a subshell in which you've enabled job control with `set -m'. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/