Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!gatech!udel!haven!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.unix.questions Subject: Re: Becoming parent ... Message-ID: <14326@smoke.brl.mil> Date: 3 Nov 90 10:31:49 GMT References: <24928@adm.BRL.MIL> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 28 In article <24928@adm.BRL.MIL> MANNS%DBNPIB5.BITNET@cunyvm.cuny.edu (Jochen Manns, PI der Uni Bonn, 732738/3611) writes: > - is it possible for a process to become a processes parent? I assume you mean, when the process did not start out as the other process's parent. The answer is, it is not supposed to happen, except for process # 1, the "init" process, which inherits as children all processes whose original parents terminate before they do. >So how can I attach to those processes again. You cannot, at least not through any means I could recommend. >... why aren't they killed when the job manager is killed ...? Why should they be? UNIX allows signals to be sent to individual processes or to entire "process groups". Unless something is specifically attempting to signal a process group, it will affect only one process. If the signal is self- generated, as for abnormal termination, only the process that generates the signal receives it. > - is there a way to access (argc,argv) from anywhere in a program? The only portable method is for the main() function to store them in some global variables. Some versions of UNIX do have "secret" global variables that are set up like that by the run-time start-up module, but you cannot rely on it across all environments.