summaryrefslogtreecommitdiff
path: root/sys/arch/sun3
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1996-05-08 08:52:33 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1996-05-08 08:52:33 +0000
commit380ad790fd8096abeff3985f2bc707ee335e503b (patch)
treeca562d7fd9e5a285c9cf9fcf045ca59220ca0818 /sys/arch/sun3
parent5033e40baed53612a03d64f466c99dc7afcf089d (diff)
avoid panics at reboot.
Diffstat (limited to 'sys/arch/sun3')
-rw-r--r--sys/arch/sun3/sun3/machdep.c4
1 files changed, 4 insertions, 0 deletions
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();
}