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:
Ron Wuerth <[log in to unmask]>
Reply To:
Ron Wuerth <[log in to unmask]>
Date:
Thu, 11 Oct 2001 07:15:08 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (57 lines)
I had a sneaky suspicion fctrl() may be involved here.
I knew those calls were a no go with sockets from the
info you've published with the Perl port.

I have to wonder if an fctrl() call is behind running the
"-S" test on the STDIN filehandle because that always
fails when I run it in my inetd daemon, even though
STDIN is functioning properly, as input from the socket.

What you've said  about using the POSIX::dup2() as a
work around makes sense of the whole situation.

Thanks again!

Ron Wuerth
Virginia International Terminals, Inc.

-----Original Message-----
From: Mark Bixby [mailto:[log in to unmask]]
Sent: Wednesday, October 10, 2001 6:28 PM
To: Ron Wuerth
Cc: [log in to unmask]
Subject: Re: MPE & Sockets & Perl ... oh my! (fwd)




Ron Wuerth wrote:
>
> Mark & Ted...you guys are my heroes! :-)
>
> I can confirm these results also.
>
> I was starting to wonder how I could manipulate the file descriptors
> directly
> in Perl, after seeing it done in C examples.  Though I did read somewhere
> that as Ted said open() with ">&" or "<&" should call a dup2();

It's just a guess, but ">&" and "<&" might be having problems if Perl is
using
fcntl() for some reason.

The MPE port of Perl currently isn't smart enough to switch between fcntl()
and
sfcntl() if sockets are being used, and fcntl() will choke or behave wrongly
on
sockets.

Using POSIX::dup2() solves the problem at a low level where fcntl() won't be
involved.
--
[log in to unmask]
Remainder of .sig suppressed to conserve scarce California electrons...

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2