Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!lll-winken!uunet!virtech!cpcahil From: cpcahil@virtech.UUCP (Conor P. Cahill) Newsgroups: comp.unix.questions Subject: Re: What is a process group Message-ID: <1291@virtech.UUCP> Date: 20 Oct 89 01:46:29 GMT References: <1158@msa3b.UUCP> Organization: Virtual Technologies Inc Lines: 20 In article <1158@msa3b.UUCP>, kevin@msa3b.UUCP (Kevin P. Kleinfelter) writes: > I have inherited some code which does > pid = setpgrp (); > ioctl (2, TIOCSPGRP, &pid); > to change the process group on the terminal. Why would someone want to > do this? The main purpose for changing the process group (and disconnecting from the tty -- the ioctl()) is to allow a background/daemon process to continue running without being affected by operations happening on the tty from which the process started. Like the user loggin out, which will normally send a SIGHUP to all processes associated with the terminal. -- +-----------------------------------------------------------------------+ | Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 ! | Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 | +-----------------------------------------------------------------------+