149117Sbostic /*- 249117Sbostic * Copyright (c) 1982, 1988 The Regents of the University of California. 349117Sbostic * All rights reserved. 423243Smckusick * 549117Sbostic * %sccs.include.proprietary.c% 649117Sbostic * 7*56509Sbostic * @(#)sys.c 7.18 (Berkeley) 10/11/92 823243Smckusick */ 9327Sbill 1049117Sbostic #include <sys/param.h> 1149117Sbostic #include <sys/reboot.h> 12*56509Sbostic 1353697Ssklower #include <ufs/ufs/dir.h> 14*56509Sbostic #include <stand/saio.h> 15327Sbill 1649117Sbostic struct iob iob[SOPEN_MAX]; 1749152Sbostic int errno; 1834463Sbostic 1948826Swilliam #ifndef i386 20327Sbill exit() 21327Sbill { 22327Sbill _stop("Exit called"); 23327Sbill } 2448826Swilliam #endif 25327Sbill 26327Sbill _stop(s) 2710022Ssam char *s; 28327Sbill { 2949152Sbostic static int stopped; 302391Stoy int i; 312391Stoy 3241542Smckusick if (!stopped) { 3349152Sbostic stopped = 1; 3449117Sbostic for (i = 0; i < SOPEN_MAX; i++) 3541542Smckusick if (iob[i].i_flgs != 0) 3649152Sbostic (void)close(i); 3741542Smckusick } 38327Sbill printf("%s\n", s); 39327Sbill _rtt(); 40327Sbill } 41