Quantcast
Viewing all articles
Browse latest Browse all 36135

help on init.d/functions daemon --pidfile

i just want to clarify what does --pidfile argument do
i was trying to make a script that when a C++ daemon program is executed it will not be executed again as long it is running.
i got a script and i dont know what does it mean or its not working the way it should be

Code:

daemon --pidfile /home/joseph/Documents/test.pid --$prog
my interpretation is
daemon function argument 1(--pidfile) argument2(path to pid) argument 3 is executable program
the 2nd argument is the path to .pid but whenever i run it it wont generate a file.
i tried to make the .pid my self but it still doesnt work my program still runs twice :(

i can use lock files but i want to know how the .pid thing works thank you :) :dance:

Viewing all articles
Browse latest Browse all 36135

Trending Articles