ref: 6064e1b6fbc4b500e125272fca374b1b5e1df760
parent: 394af5a2162c44a4e2f16897b611f622f8dbbfac
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Feb 26 19:00:58 EST 2017
games/doom: avoid /dev/cursor fd leak into music process
--- a/sys/src/games/doom/i_sound.c
+++ b/sys/src/games/doom/i_sound.c
@@ -461,8 +461,7 @@
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)