Subject: | |
From: | |
Reply To: | |
Date: | Thu, 17 Dec 1998 09:56:13 -0800 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Yalamanchili, Sudha writes:
>
> I have a cgi-program. When I try to run it I get the error CERR 14,
> unable to open stdin. I think there is a problem with the way I I
> linked.
Maybe, maybe not.
Non-POSIX programs will fail when they try to open an stdin that has been
redirected to a pipe as in the case of a web server CGI environment.
You can test for this problem via the sh.hpbin.sys command line by doing:
echo foo | testprog | cat -
The "echo foo |" redirects stdin to a pipe, and the "| cat -" redirects stdout
to a pipe. Your program will die if it's not a POSIX program.
I do all of my C programming with gcc which automatically links against the
POSIX libc. These programs can open redirected stdin OK.
I believe it's possible to use HP C/iX and link against the POSIX libc. This
may have even been mentioned recently by somebody else on this list (Walter
Murray?).
I've already told my friends inside HP that it would be very desirable to fix
this problem so that non-POSIX languages like Pascal and COBOL could be used to
write web CGIs. Still, it wouldn't hurt for you to open an HPRC call to
report this problem and request a fix via official channels.
--
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 Voice: +1 714 438-4647
"You can tune a file system, but you can't tune a fish." - tunefs(1M)
|
|
|