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.

  1. through createprocess() both 32-bit , 64-bit cmd.exe have been tried launch make command.
  2. built c program 32-bit , 64-bit.
  3. tried createprocess("c:\windows\system32\cmd.exe", "/c make -j8 some-component-name", ..)
  4. tried createprocess(null, "c:\windows\system32\cmd.exe /c make -j8 some-component-name", ..)
  5. tried createprocess(null, "cmd.exe /c make -j8 some-component-name", ..)

things haven't tried thought of, though not sure if can fix problem:

  1. 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

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -