Ron writes:
>So far, I've successfully used STDIN as incoming from the socket,
>but I'm having trouble writing output back to the socket. I'd
>tried opening the STDIN in as follows:
>
> open(SOCK, "+<-"); #which, if I've thought this out right,
There was a bug in certain versions of inetd whereby the output
went to the $STDLIST of the job, not back to the socket. Here is
what I needed to do in cvs to make it work under inetd (this should
work for both the buggy version and the fixed version):
#ifdef __hp3000s900
/* Hack for bug in MPE's inetd. Make sure stdout refers to the
* socket.
*/
close (STDOUT_FILENO);
dup2 (STDIN_FILENO, STDOUT_FILENO);
#endif
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *