mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-27 15:09:11 +00:00
Make sure SDL file descriptors don't leak into child processes
This commit is contained in:
parent
3ed8ba7d33
commit
bf97c5a22f
15 changed files with 24 additions and 24 deletions
|
@ -354,7 +354,7 @@ SDL_EVDEV_kbd_init(void)
|
|||
kbd->npadch = -1;
|
||||
|
||||
/* This might fail if we're not connected to a tty (e.g. on the Steam Link) */
|
||||
kbd->console_fd = open("/dev/tty", O_RDONLY);
|
||||
kbd->console_fd = open("/dev/tty", O_RDONLY | O_CLOEXEC);
|
||||
|
||||
if (ioctl(kbd->console_fd, TIOCLINUX, shift_state) == 0) {
|
||||
kbd->shift_state = *shift_state;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue