Re: Replacing fork/exec with spawn question

2012-11-25 Thread Christopher Faylor
On Sun, Nov 25, 2012 at 12:13:59PM -0500, LMH wrote: >It may be better to move such a discussion to a programing board since >some of this will not relate to cygwin and it would be nice to have >things like php formatted code, attachments, etc. The mods here can let >us know about that. I have t

RE: Replacing fork/exec with spawn question

2012-11-25 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
>In particular, the code I'm looking to patch does a typical fork/exec and uses >2 pipes to communicate bi-directionally parent to child. The >pipes are throwing me off as to if cygwin spawn is usable. I had no problems using fork/exec on Cygwin, even though it is mentioned to be inefficient in

Re: Replacing fork/exec with spawn question

2012-11-25 Thread Devin Nate
Hi LMH, Fair enough, although I had understood that mixing native Windows functions and cygwin was not a good practice? (Although i have no idea if thats the only option). I will be using ifdefs, and I don't need it abstracted such that I have 2 functions named the same. I just have a handful

Re: Replacing fork/exec with spawn question

2012-11-25 Thread LMH
You will need to use windows pipes as well as the windows version of fork. I have a couple of small apps that do what you are suggesting. What I did was to abstract the functions for creating process and pipes. Abstraction was done in the make file. There are functions like create_new_process(

Replacing fork/exec with spawn question

2012-11-25 Thread Devin Nate
Hi folks, I'm looking for some documentation about the cygwin spawn use, or a recommendation of a package that has had fork/exec replaced by spawn that I can review to see how someone else did it. Preferably less intimidating than gcc, and which uses pipes for IPC between parent and child. In