By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,548 Members | 1,496 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,548 IT Pros & Developers. It's quick & easy.

os.execlp and stdout

P: n/a
In a Python script I start a number of C++ processes using os.execlp. Most
of these processes output messages for debugging purposes at this time. The
problem I am having is that by starting 4 or 5 processes from my Python
script I don't get the cout messages they write. I have tried redirecting
stdout to a file but I get everything but the output from the C++ processes.
Any suggestions.

Thanks
Melissa
Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Melissa Wallis" <mw*****@swri.org> wrote in message news:<10*************@corp.supernews.com>...
In a Python script I start a number of C++ processes using os.execlp. Most
of these processes output messages for debugging purposes at this time. The
problem I am having is that by starting 4 or 5 processes from my Python
script I don't get the cout messages they write. I have tried redirecting
stdout to a file but I get everything but the output from the C++ processes.
Any suggestions.


They may be writing to stdout, but that doesn't mean it goes to your screen.
How are you starting the processes? You must first be calling fork
and then calling execlp. It would be good if you explained how you
create your child processes -- show an example from your code.
Probably your child processes are getting disconnected from your tty so their
output goes nowhere. Usually this is what you want to happen and most
fork/exec examples will do this. ... On the other hand, the very simplest
fork/exec should cause your child processes to use the
same stdout as the parent. Since you are not seeing this it makes me
suspect that your code is doing something extra to prevent this.

Yours,
Noah
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.