Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbatt!cwruecmp!hal!ncoast!allbery From: allbery@ncoast.UUCP Newsgroups: comp.os.minix Subject: Process group initialization (was: SIGNAL Handling Problems) Message-ID: <2508@ncoast.UUCP> Date: Thu, 14-May-87 21:15:58 EDT Article-I.D.: ncoast.2508 Posted: Thu May 14 21:15:58 1987 Date-Received: Sat, 16-May-87 15:05:30 EDT References: <3882@cae780.TEK.COM> Reply-To: allbery@ncoast.UUCP (Brandon Allbery) Followup-To: comp.os.minix Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 27 As quoted from <3882@cae780.TEK.COM> by hubble@cae780.TEK.COM (Larry Hubble): +--------------- | Third and last, the process group is never set to anything. Which means | it is always zero now. I'm not sure what I did is the best answer, but | it works. In mm/forkexit.c when a fork is done, do_fork() now looks to | see if the parent doing the fork is INIT. If it is INIT, a new PRIVATE | variable (process_group) is incremented and put in the process table. | If the parent is not INIT, the child inherits the parents process group. +--------------- The process group should be the same as the parent process's pid. The correct fix would not be in the kernel, it should be in init. After init forks a child but before the child execs getty (login?), the child should setpgrp(). (Okay, I lied; this requires MM to have a setpgrp() system call. Probably it should be added to do_getset(). The action of setpgrp() is to set the caller's pgrp to its pid, and any process should be allowed to do this, so very little if any checking should need to be done.) ++Brando -- Copyright (C) 1987 Brandon S. Allbery. Redistribution permitted only if the redistributor permits further redistribution. ---- Moderator for comp.sources.misc ---- Brandon S. Allbery {decvax,cbatt,cbosgd}!cwruecmp!ncoast!allbery Tridelta Industries {ames,mit-eddie,talcott}!necntc!ncoast!allbery 7350 Corporate Blvd. necntc!ncoast!allbery@harvard.HARVARD.EDU Mentor, OH 44060 +01 216 255 1080 (also eddie.MIT.EDU)