1*47917Sbostic /* 2*47917Sbostic * Copyright (c) 1989 The Regents of the University of California. 3*47917Sbostic * All rights reserved. 4*47917Sbostic * 5*47917Sbostic * Redistribution and use in source and binary forms are permitted 6*47917Sbostic * provided that the above copyright notice and this paragraph are 7*47917Sbostic * duplicated in all such forms and that any documentation, 8*47917Sbostic * advertising materials, and other materials related to such 9*47917Sbostic * distribution and use acknowledge that the software was developed 10*47917Sbostic * by the University of California, Berkeley. The name of the 11*47917Sbostic * University may not be used to endorse or promote products derived 12*47917Sbostic * from this software without specific prior written permission. 13*47917Sbostic * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14*47917Sbostic * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15*47917Sbostic * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16*47917Sbostic */ 17*47917Sbostic 18*47917Sbostic #ifndef lint 19*47917Sbostic char copyright[] = 20*47917Sbostic "@(#) Copyright (c) 1989 The Regents of the University of California.\n\ 21*47917Sbostic All rights reserved.\n"; 22*47917Sbostic #endif /* not lint */ 23*47917Sbostic 24*47917Sbostic #ifndef lint 25*47917Sbostic static char sccsid[] = "@(#)x.c 5.1 (Berkeley) 04/12/91"; 26*47917Sbostic #endif /* not lint */ 27*47917Sbostic 28*47917Sbostic main() 29*47917Sbostic { 30*47917Sbostic register int i; 31*47917Sbostic 32*47917Sbostic for (i = 0; i < 100000; i++) 33*47917Sbostic if (vfork() == 0) { 34*47917Sbostic printf("child: %d\n", getpid()); 35*47917Sbostic exit(0); 36*47917Sbostic } else { 37*47917Sbostic printf("parent: %d\n", getpid()); 38*47917Sbostic wait(0); 39*47917Sbostic } 40*47917Sbostic } 41