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 #15733 is a reply to message #15683] Thu, 10 June 1999 00:00 Go to previous messageGo to previous message
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
Vincent Fournier-Sicre wrote:
>
> I am trying to interface my IDL code w/ some C-code that ouputs error
> messages on the standard error stream ; the C-part of the code crashes
> and I would like to retrieve what was sent on the standard error stream.
>
> Could somebody tell me how to do that?
> Thanks,
> Vincent

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?

Dave Foster
--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
[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 Oct 11 10:07:38 PDT 2025

Total time taken to generate the page: 2.71889 seconds