linux - How to set process group of a shell script -
how set process group of shell script ? want child process in same process group
i expect similar setpgid() in c.
as pskocik points out, possible run process in own process group, in shells, activating job control (“monitor mode”).
(set -m; exec process_in_its_own_group)
linux has setsid
utility, runs command passed argument in own session (using eponymous system call). stronger running in own process group à la setpgrp
, may ok purpose.
if want place process in existing group rather in own group (i.e. if want full power of setpgid
), there's no common shell utility. have use c/perl/…
Comments
Post a Comment