summaryrefslogtreecommitdiffstats
path: root/arch/sandbox/os/tap.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sandbox/os/tap.c')
-rw-r--r--arch/sandbox/os/tap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sandbox/os/tap.c b/arch/sandbox/os/tap.c
index 72b7fbb5ac..83b97ffd49 100644
--- a/arch/sandbox/os/tap.c
+++ b/arch/sandbox/os/tap.c
@@ -30,7 +30,7 @@ int tap_alloc(const char *dev)
struct ifreq ifr;
int fd, err;
- if ((fd = open("/dev/net/tun", O_RDWR)) < 0) {
+ if ((fd = open("/dev/net/tun", O_RDWR | O_CLOEXEC)) < 0) {
perror("could not open /dev/net/tun");
return -1;
}