diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-02-27 00:00:58 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-02-27 00:00:58 +0100 |
commit | 6064e1b6fbc4b500e125272fca374b1b5e1df760 (patch) | |
tree | 4a4e9eb6f08d55a5892e7e80dc0ea4de83e164ca /sys | |
parent | 394af5a2162c44a4e2f16897b611f622f8dbbfac (diff) |
games/doom: avoid /dev/cursor fd leak into music process
Diffstat (limited to 'sys')
-rw-r--r-- | sys/src/games/doom/i_sound.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/src/games/doom/i_sound.c b/sys/src/games/doom/i_sound.c index ab83084d5..74b4f5d4f 100644 --- a/sys/src/games/doom/i_sound.c +++ b/sys/src/games/doom/i_sound.c @@ -461,8 +461,7 @@ void I_PlaySong(musicinfo_t *m, int loop) break; case 0: dup(mpfd[1], 1); - close(mpfd[1]); - close(mpfd[0]); + for(n=2; n<20; n++) close(n); close(0); snprint(name, sizeof(name), "/tmp/%s.mus", m->name); if(create(name, ORDWR, 0666) != 0) |