dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[DotGNU]Code redundancies: spawning processes/pipe handling


From: Maciek Plewa
Subject: [DotGNU]Code redundancies: spawning processes/pipe handling
Date: Thu, 22 Apr 2004 13:58:22 +0800
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.6) Gecko/20040113

I'm currently porting PNet to MinGW (and hopefully VC++ in near future) and found some possibly reduntant code. In both cscc/common/cc_main.c and support/spawn.c there's very similar (if not identical) code for spawning processes and handling their pipes. Would it be OK to throw out the code from cc_main.c and refer to spawn.c instead?

I've used some code from GNU CVS (+ trivial waitpid implementation) to handle process spawning and stdout->pipe redirection, but the code is slightly bloated, I'll probably implement my own solution. AFAIK except for the above, and various waitpid calls around Pnet, there are no further portability issues, are there?

Also, I had to rename the function LoadLibrary in cscc/common/cc_main.c to LoadLibraryCodeGen, as it was conflicting with an existing Win32 library. This function is internal (and wrapped with CCLoadLibrary) so it shouldn't create any API problems.

PS. You've gotta love the terminology: 'forking children with pipes' :)

--
Maciek Plewa
Military Research and Simulations Initiative

http://mil-sim.net/contact



reply via email to

[Prev in Thread] Current Thread [Next in Thread]