visual studio 2008 - c/c++, mfc: Not passing open files / handles to a spawned process -


in unix know routine: between fork() , exec() in child close except stdin/out/err, open ports or files not passed program want run.

but how do in windows? in case i'm implementing dll in c/c++, , need close both files opened (indirectly via objects) , sockets opened application loaded dll, these open file handles not passed application i'm spawning. app doesn't pass handles dll, code shouldn't need those...

so far code calles _spawnl(_p_nowait, "foo.exe", "foo.exe", "arg1", "arg2",null); visual studio 2008 if matters.

thanks help.

hmm - sorry guessing here little, sure spawnl in windows passes open file handles?

if so, maybe want @ createprocess, , startupinfo - these allow finer control on gets passed/inherited new process


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -