kolichina_s_s
April 20th, 2006, 07:35 AM
Hi,
I am newbee in Linux and am working on C. I have developed a daemon, and I was able to launch it successfully and shut it down successfully.
But when i studied the sample init script file of an existing daemon in init.d directory i found that most of them were using a .pid file from /var/run , while we should say good bye to the inital pid. why should i require this .pid file :rolleyes: ?
Also i want my daemon to be in any directory the user wants it to. but i have few problems as i am changing the current working directory of my daemon to a specified directory in my code. but i want my user to specify this directory. and also there are few more things that the user needs to specify. How can I achive this ? BTW what is config file and how can i use this file to suit my needs :confused: ?
Please help in clearing these doubts.
Thanks in advance
I am newbee in Linux and am working on C. I have developed a daemon, and I was able to launch it successfully and shut it down successfully.
But when i studied the sample init script file of an existing daemon in init.d directory i found that most of them were using a .pid file from /var/run , while we should say good bye to the inital pid. why should i require this .pid file :rolleyes: ?
Also i want my daemon to be in any directory the user wants it to. but i have few problems as i am changing the current working directory of my daemon to a specified directory in my code. but i want my user to specify this directory. and also there are few more things that the user needs to specify. How can I achive this ? BTW what is config file and how can i use this file to suit my needs :confused: ?
Please help in clearing these doubts.
Thanks in advance