Commit 044e082c authored by Huw D M Davies's avatar Huw D M Davies Committed by Alexandre Julliard

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

/dev/sequencer open.
parent b409cf62
...@@ -712,7 +712,7 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags) ...@@ -712,7 +712,7 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
WARN("can't open (%s)!\n", strerror(errno)); WARN("can't open (%s)!\n", strerror(errno));
return MMSYSERR_ALLOCATED; return MMSYSERR_ALLOCATED;
} }
fcntl(audio, F_SETFD, 1); /* set close on exec flag */
wwo->unixdev = audio; wwo->unixdev = audio;
wwo->wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK); wwo->wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK);
...@@ -1736,6 +1736,7 @@ static DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags) ...@@ -1736,6 +1736,7 @@ static DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
WARN("can't open (%s)!\n", strerror(errno)); WARN("can't open (%s)!\n", strerror(errno));
return MMSYSERR_ALLOCATED; return MMSYSERR_ALLOCATED;
} }
fcntl(audio, F_SETFD, 1); /* set close on exec flag */
wwi = &WInDev[wDevID]; wwi = &WInDev[wDevID];
if (wwi->lpQueuePtr) { if (wwi->lpQueuePtr) {
......
...@@ -402,6 +402,7 @@ static int midiOpenSeq(void) ...@@ -402,6 +402,7 @@ static int midiOpenSeq(void)
midiSeqFD = -1; midiSeqFD = -1;
return -1; return -1;
} }
fcntl(midiSeqFD, F_SETFD, 1); /* set close on exec flag */
ioctl(midiSeqFD, SNDCTL_SEQ_RESET); ioctl(midiSeqFD, SNDCTL_SEQ_RESET);
} }
numOpenMidiSeq++; numOpenMidiSeq++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment