diff options
| author | Charles.Forsyth <devnull@localhost> | 2009-04-01 22:55:47 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2009-04-01 22:55:47 +0000 |
| commit | 1892ac4b50072992f5214e95609a8c5c51d01a0f (patch) | |
| tree | b29a37ab71725ede5acc1c22a58e5bcf527c0761 /emu/Linux/os.c | |
| parent | 4eb166cf184c1f102fb79e31b1465ea3e2021c39 (diff) | |
20090401-2354
Diffstat (limited to 'emu/Linux/os.c')
| -rw-r--r-- | emu/Linux/os.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/emu/Linux/os.c b/emu/Linux/os.c index 49aec7e5..b11ec83a 100644 --- a/emu/Linux/os.c +++ b/emu/Linux/os.c @@ -128,7 +128,7 @@ kproc(char *name, void (*func)(void*), void *arg, int flags) if(flags & KPX11){ p->kstack = nil; /* never freed; also up not defined */ - tos = (char*)mallocz(X11STACK, 0) + X11STACK - sizeof(void*); + tos = (char*)mallocz(X11STACK, 0) + X11STACK - sizeof(vlong); }else p->kstack = stackalloc(p, &tos); @@ -291,6 +291,10 @@ cleanexit(int x) void osreboot(char *file, char **argv) { + if(dflag == 0) + termrestore(); + execvp(file, argv); + error("reboot failure"); } void @@ -517,7 +521,7 @@ stackalloc(Proc *p, void **tos) rv = stacklist.free; stacklist.free = *(void **)rv; unlock(&stacklist.l); - *tos = rv + KSTACK - sizeof(void *); + *tos = rv + KSTACK - sizeof(vlong); *(Proc **)rv = p; return rv; } |
