libkvm: Make second /dev/null file descriptor close-on-exec as well.
MFC after: 1 week
This commit is contained in:
parent
76dce67f0f
commit
7b05a79942
@ -187,7 +187,7 @@ _kvm_open(kvm_t *kd, const char *uf, const char *mf, int flag, char *errout)
|
||||
* case you're working with a live kernel.)
|
||||
*/
|
||||
if (strcmp(mf, _PATH_DEVNULL) == 0) {
|
||||
kd->vmfd = open(_PATH_DEVNULL, O_RDONLY);
|
||||
kd->vmfd = open(_PATH_DEVNULL, O_RDONLY | O_CLOEXEC);
|
||||
return (kd);
|
||||
} else if (strcmp(mf, _PATH_MEM) == 0) {
|
||||
if ((kd->vmfd = open(_PATH_KMEM, flag | O_CLOEXEC)) <
|
||||
|
Loading…
Reference in New Issue
Block a user