Getting process exit code from CreateProcess

From: noreply (sami.viitanen_at_pp6.inet.fi(noreply))
Date: 02/27/04

  • Next message: John McCarten: "Re: TQuery without form"
    Date: Fri, 27 Feb 2004 14:12:44 GMT
    
    

    Hello,

    Is it possible to get exit code from process that is executed with
    createprocess?

    What I'm trying to do is execute 'cmd /c python_script.py >
    output_file.temp' and get exit code of python script to delphi.

    So python script is executed and it's output is redirected to file.

    All I get is exit code from cmd.exe. Is python_script.py in that case
    some kind of child process? And why I need that 'cmd /c' part to even
    execute the script at all?

    Thanks in advance.

    -SV


  • Next message: John McCarten: "Re: TQuery without form"

    Relevant Pages

    • Re: Getting process exit code from CreateProcess
      ... exits, there will be no exit code, but GetExitCodeProcess will tell you ... > So python script is executed and it's output is redirected to file. ... If CreateProcess will execute the script when you just give it the file ...
      (alt.comp.lang.borland-delphi)
    • Re: Permission Denied
      ... That's the problem I had when I wrote my first Python script. ... Then, to execute the file from from the shell prompt, I had to create a ... 'bin' directory in my home folder, cuz I didn't want to litter ... my /usr/local/bin folder with useless Python scripts. ...
      (comp.lang.python)
    • Re: Q: linux failed to execute /init?
      ... Of course in user-space they are positive with ... /init exit code: -14 ... Failed to execute /init ... More majordomo info at http://vger.kernel.org/majordomo-info.html ...
      (Linux-Kernel)
    • Re: [ham] Re: Gracefully killing kswapd, or any kernel thread
      ... execute the exit code in the context of the task that will ... that tells the exit code what to clean up. ... > determined what makes kswapd spin forever after it receives the signal. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Calling a C program from a Python Script
      ... > call the C program from a Python script like this: ... C source file and execute the C source? ... a C interpreter, I guess you could invoke the interpreter from ...
      (comp.lang.python)