From 42fe011d2a637d698d5bc53469587698311223b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Thu, 10 Apr 2008 16:46:26 +0000 Subject: [PATCH] Set close-on-exec flag on USB Kit device descriptors, so apps launched by Tracker won't inherit all the fds to hubs as they do on Zeta :) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24891 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/device/USBDevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kits/device/USBDevice.cpp b/src/kits/device/USBDevice.cpp index 3ebb9df31f..79e618bfc3 100644 --- a/src/kits/device/USBDevice.cpp +++ b/src/kits/device/USBDevice.cpp @@ -49,7 +49,7 @@ BUSBDevice::SetTo(const char *path) return B_BAD_VALUE; fPath = strdup(path); - fRawFD = open(path, O_RDWR); + fRawFD = open(path, O_RDWR|O_CLOEXEC); if (fRawFD < 0) { Unset(); return B_ERROR;