[quake3-bugzilla] [Bug 5080] [patch] code/sys/sys_unix.c:Sys_Dialog doesn't check exit codes properly

bugzilla-daemon at icculus.org bugzilla-daemon at icculus.org
Mon Jul 18 13:35:31 EDT 2011


https://bugzilla.icculus.org/show_bug.cgi?id=5080

q3urt.undead at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #2837|0                           |1
        is obsolete|                            |
   Attachment #2851|0                           |1
        is obsolete|                            |

--- Comment #11 from q3urt.undead at gmail.com 2011-07-18 13:35:29 EDT ---
Created attachment 2852
  --> https://bugzilla.icculus.org/attachment.cgi?id=2852
Redirect to null, check error codes properly

Tim: The system() return codes were not correct.  System() doesn't return the
child exit code directly.

There are three cases:

int code = system(...);

code == -1 is a failure (fork() etc)
code & 127 != 0 means the child process had a signal
code >> 8 means the actual child exit code that you want to check against
126/127

Attached is a patch which fixes this.  Using this patch, it works as expected
and pops up the xmessage dialog.  I based it off of your patch rather than my
earlier one.

-- 
Configure bugmail: https://bugzilla.icculus.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the quake3-bugzilla mailing list