Home » Extra libraries, Code snippets, applications etc. » C++ language problems and code snippets » capturing stdout/err/in of subprocess
Re: capturing stdout/err/in of subprocess [message #1760 is a reply to message #1755] |
Sat, 18 March 2006 01:01 |
lundman
Messages: 175 Registered: March 2006 Location: Tokyo
|
Experienced Member |
|
|
I must agree I am not quite following why you need to know if your pipe-child is listening or not. You'll know if the child has gone away (EPIPE). The whole line buffering and echo is a tty/terminal feature which you can disable with ioctl(), that is quite trivial.
But if you create pipes to your child you need not worry about linemode/echo as it is direct without the tty/terminal layer.
You can check the number of bytes buffered in the pipe, set the low and high water marks, and maybe even the process flags. But why?
In LiON, to make sure to be portable, and allow for the pipe to be in select() non-blocking loops (HANDLES can't be in select(), and nonblocking polling is hard if you want to work on Win95/98/Me), I had to create read/write threads to translate between HANDLE and SOCKET.
But it works well, the same code will spawn processes on Unix, as Windows, and talk to it. I had to implement fork() and execv() for Windows though.
|
|
|
|
|
capturing stdout/err/in of subprocess
By: wilho on Mon, 13 March 2006 14:21
|
|
|
Re: capturing stdout/err/in of subprocess
By: mirek on Mon, 13 March 2006 14:50
|
|
|
Re: capturing stdout/err/in of subprocess
|
|
|
Re: capturing stdout/err/in of subprocess
By: mirek on Tue, 14 March 2006 09:22
|
|
|
Re: capturing stdout/err/in of subprocess
By: wilho on Tue, 14 March 2006 08:53
|
|
|
Re: capturing stdout/err/in of subprocess
|
|
|
Re: capturing stdout/err/in of subprocess
By: mirek on Tue, 14 March 2006 10:54
|
|
|
Re: capturing stdout/err/in of subprocess
|
|
|
Re: capturing stdout/err/in of subprocess
By: lundman on Tue, 14 March 2006 12:00
|
|
|
Re: capturing stdout/err/in of subprocess
By: mirek on Tue, 14 March 2006 12:04
|
|
|
Re: capturing stdout/err/in of subprocess
|
|
|
Re: capturing stdout/err/in of subprocess
By: mirek on Wed, 15 March 2006 09:59
|
|
|
Re: capturing stdout/err/in of subprocess
By: mr_ped on Fri, 17 March 2006 10:52
|
|
|
Re: capturing stdout/err/in of subprocess
By: mirek on Fri, 17 March 2006 12:08
|
|
|
Re: capturing stdout/err/in of subprocess
By: fudadmin on Fri, 17 March 2006 12:11
|
|
|
Re: capturing stdout/err/in of subprocess
By: mirek on Fri, 17 March 2006 12:23
|
|
|
Re: capturing stdout/err/in of subprocess
|
|
|
Re: capturing stdout/err/in of subprocess
By: mirek on Fri, 17 March 2006 23:25
|
|
|
Re: capturing stdout/err/in of subprocess
|
|
|
Re: capturing stdout/err/in of subprocess
By: lundman on Sat, 18 March 2006 01:01
|
|
|
Re: capturing stdout/err/in of subprocess
By: mirek on Sat, 18 March 2006 08:47
|
|
|
Re: capturing stdout/err/in of subprocess
By: wilho on Sat, 18 March 2006 14:33
|
|
|
Re: capturing stdout/err/in of subprocess
By: lundman on Sat, 18 March 2006 15:05
|
Goto Forum:
Current Time: Sat May 04 10:25:43 CEST 2024
Total time taken to generate the page: 0.02212 seconds
|