Set close on exec() flag at times when we leave /dev/dsp and

/dev/sequencer open.
oldstable
Huw D M Davies 2000-09-22 20:54:51 +00:00 committed by Alexandre Julliard
parent b409cf62d4
commit 044e082cf5
2 changed files with 3 additions and 1 deletions

View File

@ -712,7 +712,7 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
WARN("can't open (%s)!\n", strerror(errno));
return MMSYSERR_ALLOCATED;
}
fcntl(audio, F_SETFD, 1); /* set close on exec flag */
wwo->unixdev = audio;
wwo->wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK);
@ -1736,6 +1736,7 @@ static DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
WARN("can't open (%s)!\n", strerror(errno));
return MMSYSERR_ALLOCATED;
}
fcntl(audio, F_SETFD, 1); /* set close on exec flag */
wwi = &WInDev[wDevID];
if (wwi->lpQueuePtr) {

View File

@ -402,6 +402,7 @@ static int midiOpenSeq(void)
midiSeqFD = -1;
return -1;
}
fcntl(midiSeqFD, F_SETFD, 1); /* set close on exec flag */
ioctl(midiSeqFD, SNDCTL_SEQ_RESET);
}
numOpenMidiSeq++;