Path: utzoo!attcan!uunet!know!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!hpl-opus!hpnmdla!rajeev From: rajeev@hpnmdla.HP.COM (Rajeev Menon) Newsgroups: comp.unix.questions Subject: Orphaned processes : Please explain Message-ID: <2140001@hpnmdla.HP.COM> Date: 14 Sep 90 22:03:30 GMT Organization: HP Network Measurements Div, Santa Rosa, CA Lines: 80 I am running HP-UX A.B3.10 on an HP 9000/855. I am have a little program that creates three more processes, such that P0 the original process is parent of P1, which is parent of P2, etc. After creating the processes, I ask each process to print out its PID and PPID into a file called "junk". I am in no way synchronizing the processes, so the order they write to this file is "random". But it doesn't seem random... And sometimes it seems hard to explain. Can someone help ??? Here is the program called "fork.c" --------------------------Cut here--------------------------------------- #include int cprocs(nprocs) int nprocs; { int i, pid; for ( i=0; i