HP3000-L Archives

June 1997, Week 1

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:
Craig Fairchild <[log in to unmask]>
Reply To:
Craig Fairchild <[log in to unmask]>
Date:
Tue, 3 Jun 1997 09:34:24 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (40 lines)
On Jun 2,  3:07pm, James Dickson wrote:

> I have a routine which performs a readable select on one socket FD and
> two pipe FD's.   When I call ioctl on the pipe FD's to see how many
> bytes I can read from the pipe I get ETIME (error 52 - operation timed
> out).   This code works fine on HPUX and SCO.
>
> Are you allowed to mix sockets and pipes on 5.5 like you can on Unix?
>
> If so anyone got an idea what I could be doing wrong?
>
>-- End of excerpt from James Dickson

Hello James,

ioctl() is a non-standard function - it doesn't appear in the POSIX.1 standard.
It is in the SPEC-1170 standard, which defines what interfaces an OS must
provide in order to be branded with the UNIX(tm) trademark, but the actual
commands to ioctl() are still implementation defined. My guess would be that
this specific ioctl() command is not implemented in MPE. I don't have access to
the source code for pipes, or I'd verify that for you. What you're attempting
to do makes perfect sense, and part of our long-standing goal has always been
to help ease the ability to port applications to MPE. Jeff Vance, our Open
Systems Architect, has been keeping a list of POSIX "smoothing" items (things
that aren't part of the POSIX standard, but are still needed to allow for
smooth integration of MPE and UNIX worlds) that we should work on. I'll make
sure that this gets added to the list.

In terms of workarounds, if you don't have any knowledge of the amount of data
to expect (the writer could agree to always pad out writes so that they are
always of a fixed size), then the only other thing that comes quickly to mind
is the rather tedious reading of a single character at a time. Of course
select() would still need to be called so that you could determine whether the
next character read would cause the process to wait. There are probably more
clever solutions available too, they just don't immediately jump out at me.

Good Luck,
Craig Fairchild
MPE/iX File System Architect

ATOM RSS1 RSS2