ref: 0daed9edea06e8699b662efe7fe2625ad206f75e
parent: 16ef6e5596e08a79bb620e605892f68188a817f0
author: qwx <devnull@localhost>
date: Thu Aug 10 13:09:49 EDT 2017
doom: clean up temporary mus files
--- a/sys/src/games/doom/i_sound.c
+++ b/sys/src/games/doom/i_sound.c
@@ -463,8 +463,8 @@
dup(mpfd[1], 1);
for(n=3; n<20; n++) close(n);
close(0);
- snprint(name, sizeof(name), "/tmp/%s.mus", m->name);
- if(create(name, ORDWR, 0666) != 0)
+ snprint(name, sizeof(name), "/tmp/doom.%d", getpid());
+ if(create(name, ORDWR|ORCLOSE, 0666) != 0)
sysfatal("create: %r");
n = W_LumpLength(m->lumpnum);
if(write(0, m->data, n) != n)