Add a O_CLOEXEC use missed in r323166.

PR:		199810
Reported by:	Jukka A. Ukkonen <jau789@gmail.com>
MFC after:	3 days
This commit is contained in:
Mark Johnston 2017-09-12 14:38:10 +00:00
parent c7847a364a
commit b934b56429

View File

@ -1109,7 +1109,7 @@ dt_vopen(int version, int flags, int *errp,
*/
if (err == ENOENT && modfind("dtraceall") < 0) {
kldload("dtraceall"); /* ignore the error */
dtfd = open("/dev/dtrace/dtrace", O_RDWR);
dtfd = open("/dev/dtrace/dtrace", O_RDWR | O_CLOEXEC);
err = errno;
}
#endif