diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-10-04 02:26:40 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-10-04 02:26:40 +0200 |
commit | 5c4756974b7f0a61d267ae522605600ff4409507 (patch) | |
tree | 7f7fa2c969d6413d7fb6d73415e2bd58a97c92eb /sys/src/cmd/page.c | |
parent | fe03ec0e21bf2491b7746e81053e91636eb1aa9c (diff) |
page: dont tell rio our pid
$wsys might be from a remote system so pid will not work.
new rio errors out on mouse/cons instead.
Diffstat (limited to 'sys/src/cmd/page.c')
-rw-r--r-- | sys/src/cmd/page.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/src/cmd/page.c b/sys/src/cmd/page.c index 42584916f..1960d4cfc 100644 --- a/sys/src/cmd/page.c +++ b/sys/src/cmd/page.c @@ -1269,7 +1269,7 @@ Out: void showext(Page *p) { - char buf[128], label[64], *argv[4]; + char label[64], *argv[4]; Point ps; int fd; @@ -1289,8 +1289,7 @@ showext(Page *p) seek(fd, 0, 0); } if(rfork(RFPROC|RFMEM|RFFDG|RFNOTEG|RFNAMEG|RFNOWAIT) == 0){ - snprint(buf, sizeof(buf), "-pid %d", getpid()); - if(newwindow(buf) != -1){ + if(newwindow(nil) != -1){ dupfds(fd, 1, 2, -1); if((fd = open("/dev/label", OWRITE)) >= 0){ write(fd, label, strlen(label)); @@ -1504,10 +1503,8 @@ main(int argc, char *argv[]) atexit(killcohort); if(newwin > 0){ - s = smprint("-pid %d", getpid()); - if(newwindow(s) < 0) + if(newwindow(nil) < 0) sysfatal("newwindow: %r"); - free(s); } if(initdraw(drawerr, nil, argv0) < 0) sysfatal("initdraw: %r"); |