Path: utzoo!utgpu!watserv1!watmath!att!att!news.cs.indiana.edu!cica!sol.ctr.columbia.edu!samsung!munnari.oz.au!metro!cluster!necisa!boyd From: boyd@necisa.ho.necisa.oz (Boyd Roberts) Newsgroups: comp.unix.questions Subject: Re: Becoming parent ... Message-ID: <1917@necisa.ho.necisa.oz> Date: 5 Nov 90 03:50:28 GMT References: <24928@adm.BRL.MIL> Organization: NEC Information Systems Australia Pty. Ltd. Lines: 34 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? In No, the parent/child child relationship can only be created via fork(2). You can't re-parent an arbitary process. Of course, init (process 1) is a special case. Processes whose parent exits before them have their parent process id change to be that of init when the parent exits. > - is there a way to access (argc,argv) from anywhere in a program? Yes, declare: int gargc; char *gargv[]; as globals and in main() go: main(argc, argv) int argc; char *argv[]; { gargc = argc; gargv = argv; ... } Isn't this one a FAQ in comp.lang.c? Boyd Roberts boyd@necisa.ho.necisa.oz.au ``When the going gets wierd, the weird turn pro...''