Message12204
Logged In: YES
user_id=14198
I tried truncating as you suggest, and this works fine -
although it gives different results than Linux. Digging
deeper, I found for linux:
"""
The value from the wait() system call is split into three parts
mask 0xff00 is the exit status
mask 0x007f is the signal causing the exit
mask 0x0080 is the cord dumped flag in combination with a signal
"""
To get the same results as Linux for negative exit codes, it
seems:
result = (int)((exit_code & 0x000000FF) << 8);
Will do the job. Counter-intuitively, this will make
sys.exit(-1) yield an exit code of 65280, but this exactly
what happens on Linux.
Should we try and strive for compatibility within Python, or
compatibility with the host OS? I lean towards
compatibility with Linux - if they want win32 specific
stuff, use win32 specific code.
Thoughts? |
|
Date |
User |
Action |
Args |
2007-08-23 14:05:23 | admin | link | issue602245 messages |
2007-08-23 14:05:23 | admin | create | |
|