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:
markj 2017-09-12 14:38:10 +00:00
parent 5210116662
commit ca4b280fef

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