diff options
author | qwx <devnull@localhost> | 2017-08-10 17:09:49 +0200 |
---|---|---|
committer | qwx <devnull@localhost> | 2017-08-10 17:09:49 +0200 |
commit | 0daed9edea06e8699b662efe7fe2625ad206f75e (patch) | |
tree | c00abc97c40826932a431b70f28d3e0f90dd4a41 /sys/src/games | |
parent | 16ef6e5596e08a79bb620e605892f68188a817f0 (diff) |
doom: clean up temporary mus files
Diffstat (limited to 'sys/src/games')
-rw-r--r-- | sys/src/games/doom/i_sound.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/games/doom/i_sound.c b/sys/src/games/doom/i_sound.c index 1eae90838..aff0a3433 100644 --- a/sys/src/games/doom/i_sound.c +++ b/sys/src/games/doom/i_sound.c @@ -463,8 +463,8 @@ void I_PlaySong(musicinfo_t *m, int loop) 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) |