Mercurial > sdl-ios-xcode
view docs/man3/SDL_JoystickClose.3 @ 3068:b21348d47cab
Fixed bug #633
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.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 17 Feb 2009 05:17:51 +0000 |
parents | 546f7c1eb755 |
children | 1238da4a7112 |
line wrap: on
line source
.TH "SDL_JoystickClose" "3" "Tue 11 Sep 2001, 23:00" "SDL" "SDL API Reference" .SH "NAME" SDL_JoystickClose \- Closes a previously opened joystick .SH "SYNOPSIS" .PP \fB#include "SDL\&.h" .sp \fBvoid \fBSDL_JoystickClose\fP\fR(\fBSDL_Joystick *joystick\fR); .SH "DESCRIPTION" .PP Close a \fBjoystick\fR that was previously opened with \fI\fBSDL_JoystickOpen\fP\fR\&. .SH "SEE ALSO" .PP \fI\fBSDL_JoystickOpen\fP\fR, \fI\fBSDL_JoystickOpened\fP\fR ...\" created by instant / docbook-to-man, Tue 11 Sep 2001, 23:00