1 /*- 2 * Copyright (c) 1982, 1988 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.proprietary.c% 6 * 7 * @(#)sys.c 7.17 (Berkeley) 05/27/92 8 */ 9 10 #include <sys/param.h> 11 #include <sys/reboot.h> 12 #include <ufs/ufs/dir.h> 13 #include "saio.h" 14 15 struct iob iob[SOPEN_MAX]; 16 int errno; 17 18 #ifndef i386 19 exit() 20 { 21 _stop("Exit called"); 22 } 23 #endif 24 25 _stop(s) 26 char *s; 27 { 28 static int stopped; 29 int i; 30 31 if (!stopped) { 32 stopped = 1; 33 for (i = 0; i < SOPEN_MAX; i++) 34 if (iob[i].i_flgs != 0) 35 (void)close(i); 36 } 37 printf("%s\n", s); 38 _rtt(); 39 } 40