• Sam Lantinga's avatar
    Fixed bug #633 · d9d69026
    Sam Lantinga authored
       Description From  Michael Stone   2008-09-25 19:27:29   (-) [reply]
    
    To determine whether a pid is occupied with the kill(pid, 0) idiom, you have to
    test
    
    #include <signal.h>
    #include <errno.h>
    kill(pid, 0) < 0 && errno == ESRCH
    
    not just
    
    #include <signal.h>
    kill(pid, 0) < 0
    
    otherwise you get incorrect results when pid is running as a different user
    (causing kill(pid, 0) to return -1 + EPERM).
    
    src/audio/alsa/SDL_alsa_audio.c is certainly affected by this bug in both
    1.2.13 and 1.3-trunk. It probably occurs in other places as well.
    
    --HG--
    extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403533
    d9d69026
Name
Last commit
Last update
..
audio Loading commit data...
cdrom Loading commit data...
cpuinfo Loading commit data...
events Loading commit data...
file Loading commit data...
haptic Loading commit data...
joystick Loading commit data...
libm Loading commit data...
loadso Loading commit data...
main Loading commit data...
stdlib Loading commit data...
thread Loading commit data...
timer Loading commit data...
video Loading commit data...
SDL.c Loading commit data...
SDL_compat.c Loading commit data...
SDL_error.c Loading commit data...
SDL_error_c.h Loading commit data...
SDL_fatal.c Loading commit data...
SDL_fatal.h Loading commit data...