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*53697Ssklower * @(#)sys.c 7.17 (Berkeley) 05/27/92 823243Smckusick */ 9327Sbill 1049117Sbostic #include <sys/param.h> 1149117Sbostic #include <sys/reboot.h> 12*53697Ssklower #include <ufs/ufs/dir.h> 1349152Sbostic #include "saio.h" 14327Sbill 1549117Sbostic struct iob iob[SOPEN_MAX]; 1649152Sbostic int errno; 1734463Sbostic 1848826Swilliam #ifndef i386 19327Sbill exit() 20327Sbill { 21327Sbill _stop("Exit called"); 22327Sbill } 2348826Swilliam #endif 24327Sbill 25327Sbill _stop(s) 2610022Ssam char *s; 27327Sbill { 2849152Sbostic static int stopped; 292391Stoy int i; 302391Stoy 3141542Smckusick if (!stopped) { 3249152Sbostic stopped = 1; 3349117Sbostic for (i = 0; i < SOPEN_MAX; i++) 3441542Smckusick if (iob[i].i_flgs != 0) 3549152Sbostic (void)close(i); 3641542Smckusick } 37327Sbill printf("%s\n", s); 38327Sbill _rtt(); 39327Sbill } 40