Re: [Interest] Redirect stdout to a file

2013-07-03 Thread Yifei Li
Li [mailto:yifl...@gmail.com] > *Sent:* Tuesday, July 02, 2013 6:54 AM > > *To:* Scott Aron Bloom > *Cc:* interest@qt-project.org > *Subject:* Re: [Interest] Redirect stdout to a file > > ** ** > > Hi Scott, > > ** ** > > I'm working on a Mac. How a

Re: [Interest] Redirect stdout to a file

2013-07-02 Thread Alan Ezust
yifl...@gmail.com] > *Sent:* Tuesday, July 02, 2013 6:54 AM > > *To:* Scott Aron Bloom > *Cc:* interest@qt-project.org > *Subject:* Re: [Interest] Redirect stdout to a file > > ** ** > > Hi Scott, > > ** ** > > I'm working on a Mac. How about you? OS

Re: [Interest] Redirect stdout to a file

2013-07-02 Thread Scott Aron Bloom
Aron Bloom Cc: interest@qt-project.org Subject: Re: [Interest] Redirect stdout to a file Hi Scott, I'm working on a Mac. How about you? OS probably matters. Yifei On Mon, Jul 1, 2013 at 11:30 PM, Scott Aron Bloom mailto:scott.bl...@onshorecs.com>> wrote: Yes that is exactly what I d

Re: [Interest] Redirect stdout to a file

2013-07-02 Thread Yifei Li
The child program could be any Lua script written by the user. -Yifei On Tue, Jul 2, 2013 at 9:59 AM, william.croc...@analog.com < william.croc...@analog.com> wrote: > Do you have control over the child program, here? > Do you have the source code? > Are you willing to change it? > > Bill > > On

Re: [Interest] Redirect stdout to a file

2013-07-02 Thread Yifei Li
PM > > *To:* Scott Aron Bloom > *Cc:* interest@qt-project.org > *Subject:* Re: [Interest] Redirect stdout to a file > > ** ** > > Hi Scott, > > ** ** > > What I'm trying to do is exactly the same as what you did. > > ** ** > > Can you

Re: [Interest] Redirect stdout to a file

2013-07-02 Thread Michael Sué
: [Interest] Redirect stdout to a file Thank you. It's good to know this trick. But I need a cross-platform solution. - Yifei On Mon, Jul 1, 2013 at 7:07 PM, Ing. Rayner Pupo Gomez wrote: You can try on Linux with "expect", creating a config file for expect that contains a comman

Re: [Interest] Redirect stdout to a file

2013-07-01 Thread Thiago Macieira
On segunda-feira, 1 de julho de 2013 16.31.19, Yifei Li wrote: > Hi folks, > > I know this can be done using QProcess::setStandardOutputFile. > > However, I need to start my process using the static function > startDetached, and still want to be able to redirect its stdout/stderr to > another fil

Re: [Interest] Redirect stdout to a file

2013-07-01 Thread Scott Aron Bloom
Yes that is exactly what I do.. From: Yifei Li [mailto:yifl...@gmail.com] Sent: Monday, July 1, 2013 7:29 PM To: Scott Aron Bloom Cc: interest@qt-project.org Subject: Re: [Interest] Redirect stdout to a file Hi Scott, What I'm trying to do is exactly the same as what you did. Can you co

Re: [Interest] Redirect stdout to a file

2013-07-01 Thread Yifei Li
Thank you. It's good to know this trick. But I need a cross-platform solution. - Yifei On Mon, Jul 1, 2013 at 7:07 PM, Ing. Rayner Pupo Gomez wrote: > You can try on Linux with "expect", creating a config file for expect that > contains a command like "command >> output.txt" then you can start t

Re: [Interest] Redirect stdout to a file

2013-07-01 Thread Yifei Li
gt; *Sent:* Monday, July 01, 2013 3:21 PM > > *To:* Scott Aron Bloom > *Cc:* interest@qt-project.org > *Subject:* Re: [Interest] Redirect stdout to a file > > ** ** > > So is there a way to achieve what I want? -Yifei > > ** ** > > On Mon, Jul 1, 2013 at

Re: [Interest] Redirect stdout to a file

2013-07-01 Thread Ing. Rayner Pupo Gomez
You can try on Linux with "expect", creating a config file for expect that contains a command like "command >> output.txt" then you can start the expect program detached. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mai

Re: [Interest] Redirect stdout to a file

2013-07-01 Thread Scott Aron Bloom
ps running. Scot From: Yifei Li [mailto:yifl...@gmail.com] Sent: Monday, July 01, 2013 3:21 PM To: Scott Aron Bloom Cc: interest@qt-project.org Subject: Re: [Interest] Redirect stdout to a file So is there a way to achieve what I want? -Yifei On Mon, Jul 1, 2013 at 6:15 PM, Scott Aron Bloom mailt

Re: [Interest] Redirect stdout to a file

2013-07-01 Thread Yifei Li
> *To:* Scott Aron Bloom > *Cc:* interest@qt-project.org > > *Subject:* Re: [Interest] Redirect stdout to a file > > ** ** > > I just tried, and it does not work. Redirection only works if > 'proc->start()'. -Yifei > > ** ** > > On Mon, Jul 1,

Re: [Interest] Redirect stdout to a file

2013-07-01 Thread Scott Aron Bloom
Yes, calling proc.startDetached still calls the static version From: Yifei Li [mailto:yifl...@gmail.com] Sent: Monday, July 01, 2013 2:53 PM To: Scott Aron Bloom Cc: interest@qt-project.org Subject: Re: [Interest] Redirect stdout to a file I just tried, and it does not work. Redirection only

Re: [Interest] Redirect stdout to a file

2013-07-01 Thread Yifei Li
[mailto: > interest-bounces+scott.bloom=onshorecs@qt-project.org] *On Behalf Of > *Yifei > Li > *Sent:* Monday, July 01, 2013 2:25 PM > > *To:* interest@qt-project.org > *Subject:* Re: [Interest] Redirect stdout to a file > > ** ** > > Hi Scott, >

Re: [Interest] Redirect stdout to a file

2013-07-01 Thread Scott Aron Bloom
Yes... From: interest-bounces+scott.bloom=onshorecs@qt-project.org [mailto:interest-bounces+scott.bloom=onshorecs@qt-project.org] On Behalf Of Yifei Li Sent: Monday, July 01, 2013 2:25 PM To: interest@qt-project.org Subject: Re: [Interest] Redirect stdout to a file Hi Scott, Are you

Re: [Interest] Redirect stdout to a file

2013-07-01 Thread Yifei Li
f Of > *Yifei > Li > *Sent:* Monday, July 01, 2013 1:58 PM > *To:* interest@qt-project.org > > *Subject:* Re: [Interest] Redirect stdout to a file > > ** ** > > I guess dup2 needs to be called by the process, correct? But I can't > change its src c

Re: [Interest] Redirect stdout to a file

2013-07-01 Thread Scott Aron Bloom
] On Behalf Of Yifei Li Sent: Monday, July 01, 2013 1:58 PM To: interest@qt-project.org Subject: Re: [Interest] Redirect stdout to a file I guess dup2 needs to be called by the process, correct? But I can't change its src code. - Yifei On Mon, Jul 1, 2013 at 4:42 PM, Guido Seifert mailto

Re: [Interest] Redirect stdout to a file

2013-07-01 Thread Yifei Li
I guess dup2 needs to be called by the process, correct? But I can't change its src code. - Yifei On Mon, Jul 1, 2013 at 4:42 PM, Guido Seifert wrote: > > If it is only Linux you could use dup2. > > Windows? No idea. > > Guido > > > On Mon, 1 Jul 2013 16:31:19 -0400 > Yifei Li wrote: > > > Hi

Re: [Interest] Redirect stdout to a file

2013-07-01 Thread Scott Aron Bloom
Please don't response personally... One has nothing to do with the other... From: Yifei Li [mailto:yifl...@gmail.com] Sent: Monday, July 01, 2013 1:53 PM To: Scott Aron Bloom Subject: Re: [Interest] Redirect stdout to a file I can't because I want the process continues to run even

Re: [Interest] Redirect stdout to a file

2013-07-01 Thread Yifei Li
ct.org [mailto: > interest-bounces+scott.bloom=onshorecs@qt-project.org] *On Behalf Of > *Yifei > Li > *Sent:* Monday, July 01, 2013 1:31 PM > *To:* interest@qt-project.org > *Subject:* [Interest] Redirect stdout to a file > > ** ** > > Hi folks,*

Re: [Interest] Redirect stdout to a file

2013-07-01 Thread Scott Aron Bloom
Just use the non-static QProcess flow... From: interest-bounces+scott.bloom=onshorecs@qt-project.org [mailto:interest-bounces+scott.bloom=onshorecs@qt-project.org] On Behalf Of Yifei Li Sent: Monday, July 01, 2013 1:31 PM To: interest@qt-project.org Subject: [Interest] Redirect stdout

[Interest] Redirect stdout to a file

2013-07-01 Thread Yifei Li
Hi folks, I know this can be done using QProcess::setStandardOutputFile. However, I need to start my process using the static function startDetached, and still want to be able to redirect its stdout/stderr to another file. Any suggestions? Thanks, Yifei