diff options
author | Adam Jackson <ajax@redhat.com> | 2012-02-27 11:19:50 -0500 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2012-02-27 17:09:01 -0500 |
commit | d2dc9f9daa45504f035b169aba94d0b154fd29f0 (patch) | |
tree | 28ccca7fd1ab27a208a9fbd73306c922d19dac86 /src/openbsd_pci.c | |
parent | f550c1347d3518874fe1c1d417a57322ee6b52db (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.c | 2 |
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++; |