Mark Bixby wrote:
>
> Under HPUX, inetd passes the socket connection as stdin (fd 0) and stdout
> (fd 1). Under MPE, inetd passes the socket connection only as stdin (fd 0).
> You must both read *and* write to stdin (fd 0) under MPE inetd.
As far as I understand the read-and-write to fd 0 is only an issue when
using non-socket routines like READX or PRINT intrinsics but socket code
from the Posix lib (or better the libsock.a) should work on fd 0 / fd 1
as expected... (at least I did not tweak anything in Samba to use only
fd 0).
I strongly suspect that the libsock.a routines "catch" fd's which are
opened as socket and avoid file-system calls for them. This would
explain
why direct file-system calls (e.g. using fread/fwrite from libc.a) cause
strange behaviour (e.g. output in $stdlist).
> Samba/iX would be another, but I haven't had time to install it here or
> browse the source.
Yes, Samba/iX is another non-small INETD-capable source code example ;-)
Regards, Lars.