*
* Connection Manager
*
- * Copyright (C) 2007-2010 Intel Corporation. All rights reserved.
+ * Copyright (C) 2007-2012 Intel Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
#include <config.h>
#endif
+#define _GNU_SOURCE
#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
if (rfkill_type == NUM_RFKILL_TYPES)
return -EINVAL;
- fd = open("/dev/rfkill", O_RDWR);
+ fd = open("/dev/rfkill", O_RDWR | O_CLOEXEC);
if (fd < 0)
return fd;
DBG("");
- fd = open("/dev/rfkill", O_RDWR);
+ fd = open("/dev/rfkill", O_RDWR | O_CLOEXEC);
if (fd < 0) {
connman_error("Failed to open RFKILL control device");
return -EIO;