xref: /csrg-svn/sys/stand.att/sys.c (revision 49152)
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*49152Sbostic  *	@(#)sys.c	7.16 (Berkeley) 05/05/91
823243Smckusick  */
9327Sbill 
1049117Sbostic #include <sys/param.h>
1149117Sbostic #include <sys/reboot.h>
1249117Sbostic #include <ufs/dir.h>
13*49152Sbostic #include "saio.h"
14327Sbill 
1549117Sbostic struct iob iob[SOPEN_MAX];
16*49152Sbostic int errno;
1734463Sbostic 
1848826Swilliam #ifndef i386
19327Sbill exit()
20327Sbill {
21327Sbill 	_stop("Exit called");
22327Sbill }
2348826Swilliam #endif
24327Sbill 
25327Sbill _stop(s)
2610022Ssam 	char *s;
27327Sbill {
28*49152Sbostic 	static int stopped;
292391Stoy 	int i;
302391Stoy 
3141542Smckusick 	if (!stopped) {
32*49152Sbostic 		stopped = 1;
3349117Sbostic 		for (i = 0; i < SOPEN_MAX; i++)
3441542Smckusick 			if (iob[i].i_flgs != 0)
35*49152Sbostic 				(void)close(i);
3641542Smckusick 	}
37327Sbill 	printf("%s\n", s);
38327Sbill 	_rtt();
39327Sbill }
40