Login Main site Create account

16.06.2005 11:36

Why it is really useful to place symlinks to busybox plugins


Today I finally figured out why my kill script didn't work. The reason for this was, that my killall respectively pidof call didn't return a process id for the given process name.
After thorough investigation of the busybox sourcecode and trying some other stuff I found out, that pidof/killall doesn't parse /proc/$PID/cmd for the process name instead it cuts out the text between the round braces in /proc/$PID/stat. This text usually contains the name of argv[0] and in case of not having a symlink for e.g. httpd to busybox but calling the plugin directly this text contains "exe" instead of the applet-name itself. pidof and killall will then not be able to find the PID to the given process name (you may try "pidof exe" instead, if you don't believe me). After creating the symlink from httpd to busybox the killall and pidof commands worked fine (although one has to call the httpd-applet by using the full path to the symlink, otherwise this fancy applet-loading mechanism which writes "exe" into the stat entry comes into place).
Currently no comments to this entry (http://tuxx-home.at/archives/2005/06/16/T11_36_53/index.html)


Your comment (HTML tags will be stripped !!):

To verify You are not a bot, type down text from this image.

Your try: