aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <dbphillipsnz@gmail.com>2016-07-16 18:45:25 +1200
committerDavid Phillips <dbphillipsnz@gmail.com>2016-07-16 18:45:25 +1200
commit7ad4de6dc789775d613ff28f67c99c48d350cb6b (patch)
tree77f58001e5a2a2c80cb73b84d3cfddaa52fdd085
parente605143046b1295bdb953bf8456b1dca67696d86 (diff)
downloadbrightnessd-7ad4de6dc789775d613ff28f67c99c48d350cb6b.tar.xz
Add call to chmod back
This should not have been removed. There is a subtlety of mkfifo to note; it is affected by umask while chmod isn't. Thus, the call to chmod directly is required to ensure the desired mode is set on the fifo.
-rw-r--r--brightnessd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/brightnessd.c b/brightnessd.c
index 8434cfe..b703adb 100644
--- a/brightnessd.c
+++ b/brightnessd.c
@@ -54,6 +54,7 @@ int main(int argc, char **argv)
// Open a FIFO
remove(FIFO_PATH);
mkfifo(FIFO_PATH, 0666);
+ chmod(FIFO_PATH, 0666);
// FIXME : check return val
int fifo = open(FIFO_PATH, O_RDWR);