Linux shutdown - source code
Hello, I am in the process of writing a small program which emulates a timer. I'm having real trouble working out how to set the timer and letting it run for x number of seconds. When I use shutdown, I notice that the user is able to specify a time period before the computer is shutdown.
What I want to do is look at the source code for shutdown and see how they've done it. So the question is: Where can I find the source code for the Linux shutdown command? |
hi,
you have not specified which OS? so assuming you are seeking for RPM check for latest RPM of SysVinit. on my RHEL4 i have SysVinit-2.85-34.3 |
i forgot to tell you check for source rpm
|
Linux shutdown
Thanks for the suggestions, I searched for SysVinit-2.85-34.src.rpm on google and downloaded the source RPM.
|
good now extract it you will find source under /usr/src/redhat/SOURCES if you have any RH OS
|
Linux shutdown source code
Hello, once again thanks for the help to those who responded.
I had a look at the source code for shutdown.c and was completely miffed as to the location of the time delay code. It certainly isn't going to be asy working out how to code this timer program... |
All times are GMT -5. The time now is 01:42 AM. |