I
Ishwar Rattan
Here is a piece code (according to blurb on os.wait, the lower
order 7 bits of exit status of process should contain the signal
number of signal that terminated the process..) and signal number
should be 8 (SIGFPE), similar logic in C-code produces expected
result.
Any pointers?
-ishwar
----
import os
cpid = os.fork()
if cpid == 0:
2 / 0 # divide by zero
else if cpid > 0:
ps, st = os.wait()
print 'child got signal: %d, exit status: %d' %(st&0177, st>>8)
prints::
child got signal: 0, exit status 1
---
order 7 bits of exit status of process should contain the signal
number of signal that terminated the process..) and signal number
should be 8 (SIGFPE), similar logic in C-code produces expected
result.
Any pointers?
-ishwar
----
import os
cpid = os.fork()
if cpid == 0:
2 / 0 # divide by zero
else if cpid > 0:
ps, st = os.wait()
print 'child got signal: %d, exit status: %d' %(st&0177, st>>8)
prints::
child got signal: 0, exit status 1
---