acpid/acpid-2.0.5-cloexec.patch

12 lines
462 B
Diff
Raw Normal View History

diff -up acpid-2.0.5/input_layer.c.cloexec acpid-2.0.5/input_layer.c
--- acpid-2.0.5/input_layer.c.cloexec 2010-11-03 14:53:16.515625864 +0100
+++ acpid-2.0.5/input_layer.c 2010-11-03 14:53:50.235623005 +0100
@@ -291,6 +291,7 @@ int open_inputfile(const char *filename)
struct connection c;
fd = open(filename, O_RDONLY | O_NONBLOCK);
+ fcntl(fd, F_SETFD, FD_CLOEXEC);
if (fd >= 0) {
/* if this file doesn't have events we need, indicate failure */