× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I'm not familiar with ARP, but you normally can control the STD* streams
with overrides, e.g. for STDOUT you can redirect the output with OVRDBF
OUTPUT TOFILE(mylib/myfile)
You'll need to execute this command _before_ the file is opened and I
assume you'll also need to experiemnt a little with how far the override
reaches, you do it by the OVRSCOPE and OPNSCOPE-parameters

/Joakim

Joakim Svensson, Capgemini Sweden

-----Original Message-----
From: c400-l-bounces+joakim.svensson=capgemini.com@xxxxxxxxxxxx
[mailto:c400-l-bounces+joakim.svensson=capgemini.com@xxxxxxxxxxxx] On
Behalf Of kapil gupta
Sent: den 19 januari 2005 17:43
To: c400-l@xxxxxxxxxxxx
Subject: [C400-L] Need help with capturing STDOUT

Hi,

I am facing problem in collecting the output(stdout, stderr) of child
processes on Windows.
I am working in C and using the APR(Apache Portable Runtime) library.
APR's routines for process creation and redirection are being used.

My program calls the perl engine to execute a perl script. Before
creating this child process(perl execution), its stdout and stderr are
redirected to some file. Once this child process is spawned, its outputs
are rightly directed to specified file. This works fine if the called
process writes directly to STDOUT.

The problem occurs if this child process internally calls another
process.
This grand child's output is not getting redirected to that specified
file.
This grand child is getting spawned using "system" in the perl script.
Note however that the output is visible on the console that pops up.

The same code works fine on Linux.

I am using Windows 2000, apr-1.0.1 Release.

Any help would be much appretiated.

Thanks,
Kapil

This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.