Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / November 2004

Tip: Looking for answers? Try searching our database.

About pipe stdio and redirect

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
binaryboy - 10 Nov 2004 06:43 GMT
 In msdn library, there is an example about "Creating a Child Process with
Redirected Input and Output".
 now in my case, the child process whill use "printf" to write to its
stdout which is redirected to my pipe. but  as you know, the "printf" is
buffered, so the problem is that the parent's "FeadFile" can not return when
the child has already use "printf" to write something. (!!!Note that the
child process is a third party application,I can't modify it, and the child
and parent are interactive, I must know what child had written in each step,
and I can't close the handle).
 How can I solve this problem? Thank you very much.
Doug Harrison [MVP] - 10 Nov 2004 16:45 GMT
>  In msdn library, there is an example about "Creating a Child Process with
>Redirected Input and Output".
[quoted text clipped - 6 lines]
>and I can't close the handle).
>  How can I solve this problem? Thank you very much.

Unless you can tell the child process to unbuffer stdout or flush after
every write, there's nothing you can do. I don't know of any hidden way to
get a VC program to do these things.

Signature

Doug Harrison
Microsoft MVP - Visual C++


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.