Subject: Re: struct emul modification
To: Emmanuel Dreyfus <firstname.lastname@example.org>
From: Jaromír <email@example.com>
Date: 05/19/2001 21:16:47
Emmanuel Dreyfus wrote:
> Which FreeBSD version are you talking about? I just double checked
> FreeBSD-4.2, there is no SIGIO fired on read() when async I/O is
> selected on the write end of the pipe.
I just looked at their code, I haven't tried it on any FreeBSD system.
> BTW I just realized I missed a point about FreeBSD: it does send a SIGIO
> on write() when async I/O is selected on the read end of pipe, so it's
> even more complex than what I thought once.
IMHO it's only a FreeBSD bug we don't need to actually emulate. We should
report it to FreeBSD however once it would be fixed for newpipes
in our tree, so that they fix it too.
> Here is the global picture, as far as I know:
> A = SIGIO on read() when async I/O is enabled on write end of pipe
> B = SIGIO on write() when async I/O is enabled on read end of pipe
> C = SIGIO on read() when async I/O is enabled on write end of socket
> D = SIGIO on write() when async I/O is enabled on read end of socket
In A,C cases, SIGIO is sent to the writer, right? If so, it's definitely
the right behaviour and not doing so is a bug. Are you sure both
Linux and SunOS have this bug?
> A B C D
> NetBSD 1 1 1 1
> FreeBSD 0 1 1 1
> OpenBSD 0 0 1 1
I've just checked the sources via their CVSweb and they made same
mistake as I when they imported new pipes from FreeBSD. (incorrect
translation of pgsigio()). So this entry is not a valuable data
> Linux 0 0 0 1
> SunOS 0 0 0 1
> OSF/1 1 1 1 1
> Darwin 1 ? 1 ?
I guess they still use socketpair() based pipes.
> AIX 0 ? 1 ?
> Well this is okay to fix Linux and SunOS pipes, except that I will need
> someone to test the fix for SunOS. Having the fix in sys_socket was good
> because it was possible to fix both emulations at once.
BTW, does Solaris behave the same way as SunOS ?
> If we decide that sys_socket is definitively the wrong place for fixing
> this, how should it be handled?
That depends on what we end up wanting to emulate :)
Jaromir Dolecek <jdolecek@NetBSD.org> http://www.ics.muni.cz/~dolecek/
NetBSD - just plain best OS! -=*=- Got spare MCA cards or docs? Hand me them!