diff options
author | rsc <devnull@localhost> | 2004-04-21 07:38:03 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-04-21 07:38:03 +0000 |
commit | 92a0a8b69faf7882459c1ac6c9186e1c47ef0a91 (patch) | |
tree | 3004df9785dbeef29fd8e3cb856afdbf5b416bbc /src/cmd/mk/unix.c | |
parent | 8f8b0e542a8284671f9a3ae0678bb20f6962a420 (diff) | |
download | plan9port-92a0a8b69faf7882459c1ac6c9186e1c47ef0a91.tar.gz plan9port-92a0a8b69faf7882459c1ac6c9186e1c47ef0a91.tar.bz2 plan9port-92a0a8b69faf7882459c1ac6c9186e1c47ef0a91.zip |
the lastbug fix?
Diffstat (limited to 'src/cmd/mk/unix.c')
-rw-r--r-- | src/cmd/mk/unix.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/cmd/mk/unix.c b/src/cmd/mk/unix.c index 8b7e9cb8..00bee01e 100644 --- a/src/cmd/mk/unix.c +++ b/src/cmd/mk/unix.c @@ -47,15 +47,15 @@ exportenv(Envy *e) { int i; char **p; - char buf[4096]; + static char buf[16384]; p = 0; for(i = 0; e->name; e++, i++) { p = (char**) Realloc(p, (i+2)*sizeof(char*)); if(e->values) - sprint(buf, "%s=%s", e->name, wtos(e->values, IWS)); + snprint(buf, sizeof buf, "%s=%s", e->name, wtos(e->values, IWS)); else - sprint(buf, "%s=", e->name); + snprint(buf, sizeof buf, "%s=", e->name); p[i] = strdup(buf); } p[i] = 0; @@ -91,6 +91,8 @@ expunge(int pid, char *msg) kill(pid, SIGHUP); } +int mypid; + int execsh(char *args, char *cmd, Bufblock *buf, Envy *e) { @@ -102,6 +104,7 @@ execsh(char *args, char *cmd, Bufblock *buf, Envy *e) Exit(); } pid = fork(); + mypid = getpid(); if(pid < 0){ mkperror("mk fork"); Exit(); @@ -225,7 +228,7 @@ static struct SIGFPE, "sys: fp: fptrap", SIGPIPE, "sys: write on closed pipe", SIGILL, "sys: trap: illegal instruction", - SIGSEGV, "sys: segmentation violation", +// SIGSEGV, "sys: segmentation violation", 0, 0 }; |