1*dcafa303Sahl /* 2*dcafa303Sahl * CDDL HEADER START 3*dcafa303Sahl * 4*dcafa303Sahl * The contents of this file are subject to the terms of the 5*dcafa303Sahl * Common Development and Distribution License (the "License"). 6*dcafa303Sahl * You may not use this file except in compliance with the License. 7*dcafa303Sahl * 8*dcafa303Sahl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*dcafa303Sahl * or http://www.opensolaris.org/os/licensing. 10*dcafa303Sahl * See the License for the specific language governing permissions 11*dcafa303Sahl * and limitations under the License. 12*dcafa303Sahl * 13*dcafa303Sahl * When distributing Covered Code, include this CDDL HEADER in each 14*dcafa303Sahl * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*dcafa303Sahl * If applicable, add the following below this CDDL HEADER, with the 16*dcafa303Sahl * fields enclosed by brackets "[]" replaced with your own identifying 17*dcafa303Sahl * information: Portions Copyright [yyyy] [name of copyright owner] 18*dcafa303Sahl * 19*dcafa303Sahl * CDDL HEADER END 20*dcafa303Sahl */ 21*dcafa303Sahl 22*dcafa303Sahl /* 23*dcafa303Sahl * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 24*dcafa303Sahl * Use is subject to license terms. 25*dcafa303Sahl */ 26*dcafa303Sahl 27*dcafa303Sahl #include <unistd.h> 28*dcafa303Sahl 29*dcafa303Sahl #include "forker.h" 30*dcafa303Sahl 31*dcafa303Sahl int main(int argc,char ** argv)32*dcafa303Sahlmain(int argc, char **argv) 33*dcafa303Sahl { 34*dcafa303Sahl int i; 35*dcafa303Sahl 36*dcafa303Sahl for (i = 0; i < 10000; i++) { 37*dcafa303Sahl FORKER_FIRE(); 38*dcafa303Sahl if (fork() == 0) 39*dcafa303Sahl exit(0); 40*dcafa303Sahl 41*dcafa303Sahl (void) wait(NULL); 42*dcafa303Sahl } 43*dcafa303Sahl 44*dcafa303Sahl return (0); 45*dcafa303Sahl } 46