From a534ecdb48e75c46ea3c55119321257bd2304ca3 Mon Sep 17 00:00:00 2001 From: mickey Date: Wed, 8 May 1996 08:52:32 +0000 Subject: [PATCH] avoid panics at reboot. --- sys/arch/sun3/sun3/machdep.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/arch/sun3/sun3/machdep.c b/sys/arch/sun3/sun3/machdep.c index 156c0e117be..27eb73c7811 100644 --- a/sys/arch/sun3/sun3/machdep.c +++ b/sys/arch/sun3/sun3/machdep.c @@ -754,12 +754,16 @@ sys_sigreturn(p, v, retval) int waittime = -1; /* XXX - Who else looks at this? -gwr */ static void reboot_sync() { + extern struct proc proc0; struct buf *bp; int iter, nbusy; /* Check waittime here to localize its use to this function. */ if (waittime >= 0) return; + /* fix curproc */ + if (curproc == NULL) + curproc = &proc0; waittime = 0; vfs_shutdown(); } -- 2.20.1