HP3000-L Archives

November 1996, Week 3

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:
Jeff Kell <[log in to unmask]>
Reply To:
Jeff Kell <[log in to unmask]>
Date:
Mon, 18 Nov 1996 20:45:15 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (36 lines)
[log in to unmask] wrote:
>
> I'm on MPE/ix 5.0 running Perl 5.001 as my CGI scripting language to
> the NCSA server.  Here are some questions that I am having that I
> haven't figured out.
>
> 1.When running a script, I am having perl print the <PRE> tag before I
> call a MPE command via the 'system' command, then I print a </PRE>
> after the program runs.  What I get is this:

> MPE program output.
> <PRE>
> </PRE>

You are probably getting the C library buffering from the shell/perl and
unbuffered I/O from a system() call.  I'm not sure what you mean by
"call a MPE command" since this is fuzzy using system() from Posix; you
might substitute callci() which would insert the MPE output into the
normal C buffered I/O stream.  Alternatively you might try fflush()
after you print the <PRE> tag.

Jeff Kell <[log in to unmask]>
> Why is it doing the system call to the ci first, then my two prints after?
>
> 2.      Is there a way to get this to work so that the commands that I tell the
> script to run, will be run in the proper order?
>
> TIA,
>
> Kevin Newman
>
> ps. someone else asked if the NCSA server crashes when using cgi scripts. I
> haven't crashed it yet, and hopefully I won't either.  ;-)
> (I think that the problem might have been his re-direction of $null into a
> program when he was actually trying to get rid of the END OF PROGRAM at the end)

ATOM RSS1 RSS2