[Twisted-Python] [andrea at cpushare.com: Re: error after launching cpushare client]

Andrea Arcangeli andrea at cpushare.com
Wed Aug 3 16:55:08 EDT 2005

On Wed, Aug 03, 2005 at 10:16:55PM +0300, Tommi Virtanen wrote:
> .status is the _raw_ status.
> You probably mean .exitCode instead.

Ok but then do you have an idea where the 139 comes from? I'd like to
understand what's going on, to me that 139 number comes out of the blue.

> Actual .status values are unportable, thus transferring them raw over
> the network is not a good idea.

status should be the same that waitpid returns, from the docs:

"return a tuple containing its pid and exit status indication: a 16-bit
number, whose low byte is the signal number that killed the process, and
whose high byte is the exit status (if the signal number is zero); the
high bit of the low byte is set if a core file was produced.
Availability: Unix."

Now I will ask to use exitCode but still I'd like to understand how
status is connected with exitCode.

BTW, I was using exitCode already, but I thought it would be set only if
a signal wasn't delivered. Infact I wrote code like this:

		if status.value.exitCode or status.value.signal:
			if status.value.exitCode == 4:
				print 'Failure in setting the stack size to %d bytes.' % self.seccomp.stack
			if status.value.signal == signal.SIGKILL:
				print 'Seccomp task gracefully killed by seccomp.'
			elif status.value.signal == signal.SIGSEGV:
				print 'Seccomp task gracefully killed by sigsegv, status %r.' % status.value.status
			elif status.value.signal == signal.SIGQUIT:
				print 'Seccomp task killed by sigquit - should never happen.'
			print 'Seccomp task completed successfully.'

(and in the above code status.value.signal == signal.SIGSEGV but
status.value.status == 139 ;)

More information about the Twisted-Python mailing list