1

I'm running a py script on a separate process via subprocess.Popen Then I call

(proc_out, proc_err) = proc.communicate

and also read the return code

proc.returncode

While proc_err is None the return code is 3221225738

Does anyone know what it means or how to get an understandable error? Thanks

5
  • chances are that is the positive representation of a 32bit negative number? Commented Jun 22, 2020 at 12:30
  • but what does it mean as a return code of an execution? Commented Jun 22, 2020 at 13:17
  • it may be a value relative to the os or the process started. the hex value of the number is this: ‭C000 010A‬ Commented Jun 22, 2020 at 17:54
  • Added an answer. you might want to give more context on the calls made (more surrounding code). Commented Jun 22, 2020 at 17:58
  • 1
    STATUS_PROCESS_IS_TERMINATING (0xC000_010A) would normally be translated to ERROR_ACCESS_DENIED (5) for a WinAPI call. Either the process failed during initialization, or it died on an unhandled exception while running. Offhand I can't think of a system call that would raise an exception with that status code, so I'll take a wild guess that something went wrong that caused the console host process (conhost.exe) to terminate while the base API was setting up the console connection. Try running it with creationflags=subprocess.DETACHED_PROCESS and stdin=subprocess.DEVNULL. Commented Jun 23, 2020 at 2:11

1 Answer 1

2

The most likely meaning of the return code is that its the HEX value C000010A which I found a description of this for:

Error code0xC000010A
TypeWindows NT Status Code
DescriptionSTATUS_PROCESS_IS_TERMINATING
Comments

EventID.Net
In programming terms, this is a message that is returned when a function is trying to obtain a reference (a handle) to a certain process but that process is actually terminating (shutting down).

best guess is its trying to access the proces after it has finished....

Sign up to request clarification or add additional context in comments.

1 Comment

debugging further I found this other error: (5, 'AssignProcessToJobObject', 'Access is denied.') I'm using win32job.AssignProcessToJobObject(self.job_object, hProcess)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.