]> git.lizzy.rs Git - plan9front.git/commitdiff
page: dont tell rio our pid
authorcinap_lenrek <cinap_lenrek@gmx.de>
Fri, 4 Oct 2013 00:26:40 +0000 (02:26 +0200)
committercinap_lenrek <cinap_lenrek@gmx.de>
Fri, 4 Oct 2013 00:26:40 +0000 (02:26 +0200)
$wsys might be from a remote system so pid will not work.

new rio errors out on mouse/cons instead.

sys/src/cmd/page.c

index 42584916fdb51618e939fd863c62182e6accd231..1960d4cfc39a486dd9cc0c0120942c522bc8c690 100644 (file)
@@ -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");