Messages in this thread | | | From | (Miquel van Smoorenburg) | Subject | Re: Linux-1.3.81 | Date | 31 Mar 1996 15:10:54 +0200 |
| |
In article <m2yboij7gx.fsf@deanna.miranova.com>, Steven L Baur <steve@miranova.com> wrote: > >>>>>> "Linus" == Linus Torvalds <torvalds@cs.helsinki.fi> writes: >... >Linus> - named pipes now work the way God intended them to work, the SunOS >Linus> compat code is disabled by default. >... >Linus> Look it over, will you? > >Linus> Linus > >This appears to have a devastating affect on sysvinit 2.58 (it loops >on the error message ``error reading initrequest'' upon changing run >levels), appropriately enough in the routine CheckInitFifo which is >commented: >/* > * Read from the init FIFO. Processes like telnetd and rlogind can > * ask us to create login processes on their behalf. > * > * FIXME: this needs to be finished. > */ > >I'm not sure what the fix is.
The fix is that the interface definition needs to be finished. It isn't about some bug in the code ;) However, I think the new named pipe code in the kernel breaks a lot of applications. As I see it, there _is_ a difference between pipes and fifos: you cannot ever re-open a pipe, but you can re-open a fifo. With the new code, a server (init) can only accept one request on a named pipe. After the client (telinit) has closed the fifo, read() keeps returning 0 instead of blocking and select() tells init there is data waiting...
With the old SunOS behaviour it was possible to open a fifo once, do a select() on it and accept incoming requests from different clients. Now the server has to keep open()ing and close()ing the fifo, which is not pretty and will break lots of stuff.
Linus, could you please either explain a way around this or restore the old behaviour of select() on pipes?
Mike. -- Miquel van | Cistron Internet Services -- Alphen aan den Rijn. Smoorenburg, | mailto:info@cistron.nl http://www.cistron.nl/ miquels@het.net | Tel: +31-172-419445 (Voice) 430979 (Fax) 442580 (Data)
| |