cmd - make command fails when launched via CreateProcess but command line on Windows 7 -
i'm witnessing weird behavior make.exe on windows 7.
if launch directly command line "make -j8 some-component-name", command succeed.
if launch same c program using createprocess(.......) inheriting environment, etc parent, see fails below error message:
make[4]: *** create_child_process: duplicatehandle(in) failed (e=6). stop.
here's have tried far -- of them anyway didn't help.
- through createprocess() both 32-bit , 64-bit cmd.exe have been tried launch make command.
- built c program 32-bit , 64-bit.
- tried createprocess("c:\windows\system32\cmd.exe", "/c make -j8 some-component-name", ..)
- tried createprocess(null, "c:\windows\system32\cmd.exe /c make -j8 some-component-name", ..)
- tried createprocess(null, "cmd.exe /c make -j8 some-component-name", ..)
things haven't tried thought of, though not sure if can fix problem:
- using shellexecute() in place of createprocess().
by way, make utility gnu make package. , tried using 2 versions of make 3.81 , 2.something.something. made sure there's 1 make.exe accessible run in command prompt.
so, ideas on things going wrong?
thanks.
update 1: seems other person has encountered same -- android ndk-build error make.exe: *** create_child_process: duplicatehandle(in) failed (e=6)
i shall try solution on there , give further updates on this.
update 2: still curios why it's different when 1 uses createprocess(). so, i'm still thinking. answers? i'm yet try suggested solution though.
Comments
Post a Comment