comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » retrieving standard error stream from IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: retrieving standard error stream from IDL [message #15810 is a reply to message #15683] Fri, 11 June 1999 00:00 Go to previous message
Vincent Fournier-Sicr is currently offline  Vincent Fournier-Sicr
Messages: 7
Registered: June 1998
Junior Member
> Vincent -
>
> How are you interfacing to C? If you are using SPAWN, then you can
> redirect stderr in your command line:
>
> command = 'ls -R1 ' + initdir + ' 2>&1'
> SPAWN, ["/bin/sh", "-c", command], results, /NOSHELL, COUNT=count
>
> The output from stderr and stdio will appear in results[].
>
> If you are using CALL_EXTERNAL or LINK_IMAGE then you can use
> C system calls to redirect stderr to stdio if that does you any
> good. Sorry, offhand I don't remember the function calls.

>
> Doesn't the output from stderr show up on your terminal?

I am using CALL_EXTERNAL and the standard error does show on the terminal, but
I was getting so many messages on the standard error stream that I had to
store them in a file; I did that in the C-code by doing the following :

fpstderr=open("stderr.tmp",O_RDWR|O_CREAT|O_TRUNC,0755);
close(2);
dup(fpstderr);

Vincent
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Density contour curves
Next Topic: Utilities for converting IDL4 handles to IDL5 pointers

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Nov 29 07:45:57 PST 2025

Total time taken to generate the page: 1.60212 seconds