HP3000-L Archives

October 2001, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Klein <[log in to unmask]>
Reply To:
Mark Klein <[log in to unmask]>
Date:
Tue, 9 Oct 2001 07:35:12 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (24 lines)
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 *

ATOM RSS1 RSS2