HP3000-L Archives

November 2000, 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:
"Emerson, Tom # El Monte" <[log in to unmask]>
Reply To:
Emerson, Tom # El Monte
Date:
Fri, 17 Nov 2000 12:08:26 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (41 lines)
I think someone else mentioned the difference in buffering -- tell your
programmer to add explicit fflush(stdout) commands after printf's, that
generally helps get the output out in the "expected" order.

I have a similar situation where a background C program is running and
dumping diagnostics to $STDLIST; if the parent program quits unexpectedly,
quite a lot of the background program's output NEVER made it to the screen
[but from output of the foreground program, it was obvious it had passed
several diagnostic-display points in the program]  Adding fflush(stdout)
commands managed to get most (but not all) of the displays to $STDLIST when
the parent crashed.

> -----Original Message-----
> From: Paul H Christidis [mailto:[log in to unmask]]
> Sent: Thursday, November 16, 2000 6:39 PM
> To: [log in to unmask]
> Subject: [HP3000-L] C routine and $stdlist redirection
>
>
> A fellow programmer is trying to call, from COBOL, a routine
> written in C.
> He included some displays/printf's and ran the program redirecting its
> $stdlist to a disk file.
>
> After the run the file 'only' contained the 'COBOL' displays,
> while when
> executed in session the debugging displays from the C routine
> show on the
> screen.
>
> I'm guessing that it may have something to do with the file
> numbers that C
> vs COBOL use for directing their displays.
> Is there a way of making sure that the displays from the C
> routine are also
> included in the same file as the ones from the COBOL program.
>
> Regards
> Paul Christidis
>

ATOM RSS1 RSS2