diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2011-10-23 14:16:23 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-10-25 13:34:06 +0200 |
commit | 4826f90b555f009972276be1fa945d81b435950a (patch) | |
tree | 2d62eda201ef154be4aeb869978685e9d99f1a24 /tools/tap-test.c | |
parent | cb3e78500a2539a61d73ecb9708a2b06ea1f356d (diff) | |
download | connman-4826f90b555f009972276be1fa945d81b435950a.tar.gz |
tools: Add O_CLOEXEC to open()
Make sure all file descriptor are closed.
Diffstat (limited to 'tools/tap-test.c')
-rw-r--r-- | tools/tap-test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/tap-test.c b/tools/tap-test.c index c215945c..18fc00bc 100644 --- a/tools/tap-test.c +++ b/tools/tap-test.c @@ -80,7 +80,7 @@ static int create_tap(const char *ifname) struct ifreq ifr; int fd, val; - fd = open("/dev/net/tun", O_RDWR); + fd = open("/dev/net/tun", O_RDWR | O_CLOEXEC); if (fd < 0) { perror("Failed to open TUN/TAP device"); return -1; |