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*60328Smckusick * @(#)sys.c 7.20 (Berkeley) 05/24/93 823243Smckusick */ 9327Sbill 1049117Sbostic #include <sys/param.h> 1149117Sbostic #include <sys/reboot.h> 1256509Sbostic 1353697Ssklower #include <ufs/ufs/dir.h> 14*60328Smckusick #include <stand.att/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 } 4160323Smckusick 4260323Smckusick /* 4360323Smckusick * For gcc 4460323Smckusick */ 4560323Smckusick __main() 4660323Smckusick { 4760323Smckusick return; 4860323Smckusick } 49