diff options
Diffstat (limited to 'power')
-rw-r--r-- | power/power.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/power/power.c b/power/power.c index a90cc6b..e0eda2d 100644 --- a/power/power.c +++ b/power/power.c @@ -64,7 +64,7 @@ open_file_descriptors(const char * const paths[]) { int i; for (i=0; i<OUR_FD_COUNT; i++) { - int fd = open(paths[i], O_RDWR); + int fd = open(paths[i], O_RDWR | O_CLOEXEC); if (fd < 0) { fprintf(stderr, "fatal error opening \"%s\"\n", paths[i]); g_error = errno; |