Background process implementation
am 29.10.2007 19:34:51 von PayelHi,
I am trying to implement background process(bg command) in my unix
shell. Could anybody please tell me how I can proceed to implement it
in my shell?
Thanks.
Hi,
I am trying to implement background process(bg command) in my unix
shell. Could anybody please tell me how I can proceed to implement it
in my shell?
Thanks.
2007-10-29, 18:34(-00), Payel:
[...]
> I am trying to implement background process(bg command) in my unix
> shell. Could anybody please tell me how I can proceed to implement it
> in my shell?
[...]
bg only sends a SIGCONT to the process group of the stopped
process.
It's upon the
terminal's foreground process group (tcsetpgrp(3)) back to the
shell.
--
Stéphane
2007-10-29, 18:49(+00), Stephane CHAZELAS:
> 2007-10-29, 18:34(-00), Payel:
> [...]
>> I am trying to implement background process(bg command) in my unix
>> shell. Could anybody please tell me how I can proceed to implement it
>> in my shell?
> [...]
>
> bg only sends a SIGCONT to the process group of the stopped
> process.
Let me rephrase that a bit more sanely:
bg sends a SIGCONT to the stopped process group.
When you start a job, you create a new process group with
setpgid(3). If you start it in foreground (without &), you also
need to make that process group the foreground process group
(tcsetpgrp(3)).
> It's upon the
> terminal's foreground process group (tcsetpgrp(3)) back to the
> shell.
>
--
Stéphane