PacktPublishing / Linux-System-Programming-Techniques

Linux System Programming Techniques, published by Packt
MIT License
96 stars 44 forks source link

Fix order of umask call in ch10/my-daemon-v2.c #6

Open larsbergerproductions opened 5 months ago

larsbergerproductions commented 5 months ago

see https://github.com/PacktPublishing/Linux-System-Programming-Techniques/issues/5

tl;dr: first set the umask to 022, then create the pidfile for it to have the correct permissions set.