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
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:
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
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: