Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!uakari.primate.wisc.edu!uwm.edu!rutgers!att!cbnewsh!skumar From: skumar@cbnewsh.ATT.COM (swaminathan.ravikumar) Newsgroups: comp.unix.questions Subject: setpgrp question Keywords: setpgrp, unix system call Message-ID: <6863@cbnewsh.ATT.COM> Date: 22 Dec 89 15:05:16 GMT Organization: AT&T Bell Laboratories Lines: 27 If the following program is run you get the following error message: "pg cannot reopen stdout" 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"? I know that it is used to group processes to receive signals. Does this mean that the processes in the group cannot use stdin/stdout. I would like to hear from anybody who has used this call in a real application to understand this better. #include main() { setpgrp(); system("pg /usr/tmp/junk"); } Thanks. -- ravi skumar@hocus.att.com