summaryrefslogtreecommitdiff
path: root/src/openbsd_pci.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2012-02-27 11:19:50 -0500
committerAdam Jackson <ajax@redhat.com>2012-02-27 17:09:01 -0500
commitd2dc9f9daa45504f035b169aba94d0b154fd29f0 (patch)
tree28ccca7fd1ab27a208a9fbd73306c922d19dac86 /src/openbsd_pci.c
parentf550c1347d3518874fe1c1d417a57322ee6b52db (diff)
Use O_CLOEXEC for internal file descriptors
Well, almost all of them. zlib doesn't support "e" in the mode string in gzopen() though it will silently accept and ignore it, and Solaris appears not to support "e" in the mode string at all. Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'src/openbsd_pci.c')
-rw-r--r--src/openbsd_pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openbsd_pci.c b/src/openbsd_pci.c
index 14e976d..74b3636 100644
--- a/src/openbsd_pci.c
+++ b/src/openbsd_pci.c
@@ -568,7 +568,7 @@ pci_system_openbsd_create(void)
for (domain = 0; domain < sizeof(pcifd) / sizeof(pcifd[0]); domain++) {
snprintf(path, sizeof(path), "/dev/pci%d", domain);
- pcifd[domain] = open(path, O_RDWR);
+ pcifd[domain] = open(path, O_RDWR | O_CLOEXEC);
if (pcifd[domain] == -1)
break;
ndomains++;