|
|
1.1 ! root 1: /* ! 2: char id_fork[] = "@(#)fork_.c 1.1"; ! 3: * ! 4: * fork a copy of this process ! 5: * ! 6: * calling sequence: ! 7: * integer fork ! 8: * ierror = fork() ! 9: * where: ! 10: * ierror will be - child pid if parent and successful ! 11: * - 0 if child ! 12: * - -errno if unsuccessful ! 13: */ ! 14: ! 15: #include "../libI77/fiodefs.h" ! 16: ! 17: extern int errno; ! 18: ! 19: long fork_() ! 20: { ! 21: long i; ! 22: ! 23: for (i = 0; i < MXUNIT; i++) ! 24: flush_(&i); ! 25: i = (long)fork(); ! 26: if (i < 0) ! 27: return((long)(-errno)); ! 28: return(i); ! 29: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.