HP3000-L Archives

February 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:
Mark Bixby <[log in to unmask]>
Reply To:
Date:
Fri, 7 Feb 1997 14:14:56 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (44 lines)
After some exhaustive testing, I have learned the following about MPE programs
attempting to access POSIX stdin/stdout/stderr under 5.5:

1) stdin/stdout/stderr map to MPE file numbers 0/1/2.

2) Some intrinsics like PRINTFILEINFO don't recognize fnum 0 as being valid.  I
count this as a bug.

3) You can do direct FREAD/FWRITE I/O against 0/1/2 if they are associated
with a terminal.

4) GETPRIVMODE is required to do FREAD/FWRITE to 0/1/2 if they are associated
with a pipe() i.e. running as a web server CGI.  I count this as a bug.  If you
don't need PM to create a pipe, you shouldn't need PM to interact with one.

5) You can use READX to read from stdin 0 and PRINT to write to stdout 1
without needing PM.  Pipe or terminal doesn't matter.

6) When using READX or FREAD to read from a pipe, when the pipe is empty you
start getting CCE length=0 forever for all future calls.  Seems to me you
should get CCG (EOF).  Bug.

Summary: you should be able to write MPE CGI programs under 5.5 using READX
and PRINT without PM.  If you need to write to stderr, you will need PM.

I have submitted a call to HPRC to see what they think about the bugs.

This research was done on my 5.5 system.  I'm curious to know what happens on
a 5.0 system.  You can get the test program from:

        ftp://ftp.cccd.edu/pub/mpe/fdtest.pascal
        ftp://ftp.cccd.edu/pub/mpe/fdtest.nmprg

I leave it as an exercise to the reader to be able to transfer the nmprg
binary intact with CODE=NMPRG.  This program wraps many otherwise boring
filesystem intrinsics within GETPRIVMODE/GETUSERMODE.  It doesn't crash *my*
5.5 system, but I make no guarantees about your system, 5.5 or 5.0.
--
Mark Bixby                      E-mail: [log in to unmask]
Coast Community College Dist.   Web: http://www.cccd.edu/~markb/
District Information Services   1370 Adams Ave, Costa Mesa, CA, USA 92626-5429
Technical Support               +1 714 438-4647
"You can tune a file system, but you can't tune a fish." - tunefs(1M)

ATOM RSS1 RSS2