lwv@n8emr.UUCP (11/20/87)
I am in search of an explanation of setpgrp that covers several of the bases. For instance, it appears that open file descriptors or pointers are clobbered when a setpgrp() is executed. For instance, saying: setpgrp(0, getpid()); fgets(buff, stdin); in a program causes the fgets to fail; some systems you get an EIO errno value and others the program just hangs! Are there other undocumented problems with using it that we should be aware of? Where does one find the unwritten lore of using things like this? -- Larry W. Virden 75046,606 (CIS) 674 Falls Place, Reynoldsburg, OH 43068 (614) 864-8817 cbosgd!n8emr!lwv HAM/SWL BBS (HBBS) 614-457-4227.. 300/1200 bps We haven't inherited the world from our parents, but borrowed it from our children.
merlin@hqda-ai.UUCP (David S. Hayes) (11/23/87)
BSD (for those who are afflicted with Sys V) allows a user to move jobs between the foreground and background at will. It does this by assigning every process a "process group". The terminal also has a process group associated with it. Only those processes in the current process group for the control terminal can access the terminal. The C-shell controls what process is in the foreground by changing the process group of the terminal. For other jobs, the process is given either SIGTTOU (when writing) or SIGTTIN (when reading). This applies only to the control terminals - streams (BSD FILE *) to other terminals are unaffected. -- David S. Hayes, The Merlin of Avalon PhoneNet: (202) 694-6900 UUCP: *!uunet!cos!hqda-ai!merlin ARPA: ai01@hios-pent.arpa