* [9fans] fix to /sys/src/ape/lib/bsd/pty.c
@ 2002-01-24 1:25 geoff
0 siblings, 0 replies; only message in thread
From: geoff @ 2002-01-24 1:25 UTC (permalink / raw)
To: 9fans
In the course of trying to get rk to build, I had to get the APE
_getpty() working again. The new close and remove may be excessively
paranoid, but the changes from `3' to `O_RDWR' are essential.
: cpu; diff `{yesterday .} pty.c
66c66
< fd = _OPEN(fssrv, 3);
---
> fd = _OPEN(fssrv, O_RDWR);
67a68,77
> /*
> * remove fssrv here, if it exists, to avoid a race
> * between the loop in the default case below and the
> * new ptyfs removing fssrv when it starts.
> * we otherwise might be unlucky enough to open the old
> * (hung channel) fssrv before ptyfs removes it and break
> * out of the loop with an open fd to a hung channel?
> */
> close(fd);
> remove(fssrv);
78c88
< fd = _OPEN(fssrv, 3);
---
> fd = _OPEN(fssrv, O_RDWR);
88c98,99
< _MOUNT(fd, "/dev", MAFTER, "");
---
> if (_MOUNT(fd, "/dev", MAFTER, "") < 0)
> ; /* buggery */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-01-24 1:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-24 1:25 [9fans] fix to /sys/src/ape/lib/bsd/pty.c geoff
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).