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.
This commit is contained in:
parent
fe03ec0e21
commit
5c4756974b
1 changed files with 3 additions and 6 deletions
|
@ -1269,7 +1269,7 @@ Out:
|
||||||
void
|
void
|
||||||
showext(Page *p)
|
showext(Page *p)
|
||||||
{
|
{
|
||||||
char buf[128], label[64], *argv[4];
|
char label[64], *argv[4];
|
||||||
Point ps;
|
Point ps;
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
|
@ -1289,8 +1289,7 @@ showext(Page *p)
|
||||||
seek(fd, 0, 0);
|
seek(fd, 0, 0);
|
||||||
}
|
}
|
||||||
if(rfork(RFPROC|RFMEM|RFFDG|RFNOTEG|RFNAMEG|RFNOWAIT) == 0){
|
if(rfork(RFPROC|RFMEM|RFFDG|RFNOTEG|RFNAMEG|RFNOWAIT) == 0){
|
||||||
snprint(buf, sizeof(buf), "-pid %d", getpid());
|
if(newwindow(nil) != -1){
|
||||||
if(newwindow(buf) != -1){
|
|
||||||
dupfds(fd, 1, 2, -1);
|
dupfds(fd, 1, 2, -1);
|
||||||
if((fd = open("/dev/label", OWRITE)) >= 0){
|
if((fd = open("/dev/label", OWRITE)) >= 0){
|
||||||
write(fd, label, strlen(label));
|
write(fd, label, strlen(label));
|
||||||
|
@ -1504,10 +1503,8 @@ main(int argc, char *argv[])
|
||||||
atexit(killcohort);
|
atexit(killcohort);
|
||||||
|
|
||||||
if(newwin > 0){
|
if(newwin > 0){
|
||||||
s = smprint("-pid %d", getpid());
|
if(newwindow(nil) < 0)
|
||||||
if(newwindow(s) < 0)
|
|
||||||
sysfatal("newwindow: %r");
|
sysfatal("newwindow: %r");
|
||||||
free(s);
|
|
||||||
}
|
}
|
||||||
if(initdraw(drawerr, nil, argv0) < 0)
|
if(initdraw(drawerr, nil, argv0) < 0)
|
||||||
sysfatal("initdraw: %r");
|
sysfatal("initdraw: %r");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue