Where can I find the source code of the "halt" tool? [closed] Where can I find the source code of the "halt" tool? [closed] unix unix

Where can I find the source code of the "halt" tool? [closed]


In Ubuntu at least, /sbin/halt is a symlink to /sbin/reboot, which is a part of upstart. Get it here.


Here's a version of halt from busybox. The linux/bsd/whatever one is probably similar in many ways, although a little more elaborate :)

http://www.google.com/codesearch/p?hl=en#EKZaOgYQHwo/unstable/sources/busybox-1.2.1.tar.gz%7C5l79Bld9wLE/busybox-1.2.1/init/halt.c&q=halt.c%20lang:c

This URL appears to have a copy of the sysvinit source:

ftp://ftp.cistron.nl/pub/people/miquels/sysvinit/sysvinit-2.86.tar.gz

The halt source should be in that archive.