Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!ncrlnk!ncrcce!mercer From: mercer@ncrcce.StPaul.NCR.COM (Dan Mercer) Newsgroups: comp.unix.questions Subject: Re: setpgrp question Message-ID: <1802@ncrcce.StPaul.NCR.COM> Date: 27 Dec 89 04:47:08 GMT References: <6863@cbnewsh.ATT.COM> <1989Dec24.222740.8645@virtech.uucp> Reply-To: mercer@ncrcce.StPaul.NCR.COM (Dan Mercer) Organization: NCR Comten, Inc. Lines: 29 Keywords:setpgrp, unix system call In article <1989Dec24.222740.8645@virtech.uucp> cpcahil@virtech.uucp (Conor P. Cahill) writes: :In article <6863@cbnewsh.ATT.COM>, skumar@cbnewsh.ATT.COM (swaminathan.ravikumar) writes: : :> By reading different sources I found out that a process can :> break its control terminal by calling "setpgrp". I don't :> understand this 100%. Why should the process lose the control :> terminal? why do you need "setpgrp"? : :setpgrp() is one of the steps that should be executed by a daemon :process at initialization time. It does disconnect the terminal from :the controll tty and therefore should only be used by programs that :no longer wish to be associated with a terminal. For instance, in the telecommunications program PCOMM, patterned closely after PROCOMM(tm), the input process originally generated SIGHUP back to the controlling terminal when the dial-out line hung up. I was one of the first to notice the problem, since I have a personal daemon running in background that provides me special services within vi. Adding a setpgrp() to the input routine cleared the problem and was later added by a patch level. The Token Ring NetBIOS software for the NCR Tower has the same problem with nlogin, which allows login sessions across the ring. -- Dan Mercer Reply-To: mercer@ncrcce.StPaul.NCR.COM (Dan Mercer)