Page 1 of 1

killproc function not working ... or down the rabbit hoie

PostPosted: Dec 8th, '13, 03:15
by linuxdad
Further continuing down the rabbit hole, I find the following:

There is a difference in starting the daemon using the fully qualified and relevant pathways.
Code: Select all
[root@ns init.d]# pwd
/etc/init.d
[root@ns init.d]# ./clamd start
Starting Clam AntiVirus Daemon:                                 [  OK  ]
NOTE: this relate startup method works perfectly.


Whereas using the fully qualified path to the init script seems to perform a different startup script.
Code: Select all
[root@ns init.d]# /etc/init.d/clamd start
Starting clamd (via systemctl):  Warning: Unit file of clamd.service changed on disk, 'systemctl --system daemon-reload' recommended.


I cannot seem to understand why the difference of starting up the process. Why is this different, and why does the fully qualified pathway not seem to restart the daemon as expected?

Re: killproc function not working ... or down the rabbit hoi

PostPosted: Dec 8th, '13, 18:53
by doktor5000
linuxdad wrote:I cannot seem to understand why the difference of starting up the process. Why is this different, and why does the fully qualified pathway not seem to restart the daemon as expected?


You could report the difference between absolute and relative invocation as a bug, after searching if it hasn't been reported yet already: https://wiki.mageia.org/en/How_to_report_a_bug_properly

But why don't you use the service command? service foo start Or use systemctl? Maybe you want to have a look at http://fedoraproject.org/wiki/SysVinit_ ... Cheatsheet

And I don't understand why you mention start and restart (see bold marked parts of quote) - if you only say start, it will not restart the running service, why should it?

Realted, what are you referencing in the subject? The killproc() function or the killproc standalone binary?