LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-28-2010, 12:40 AM   #1
s2cuts
Member
 
Registered: Mar 2007
Posts: 61

Rep: Reputation: 18
shutdown parameter "t" functionality how-to?


It looks like the -t parameter is no longer available when using the shutdown command. What I'm trying to figure out is how to send all the daemons the kill signal, but wait a certain amount of time before actually halting or rebooting. I can't be the only one wanting to do this, but for all the searching I'm doing I can't find an answer.

The following only warns, then waits 1 minute before sending the kill signal and immediately halting, correct? Or am I getting this completely wrong?
Code:
# shutdown -h +1
 
Old 12-28-2010, 09:01 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060
Well, there is an alternative to shutdown; try init 0 instead (it'll go "right now," shutting down all the running processes (neatly) and then all the way to power off).

Hope this helps some.

Last edited by tronayne; 12-28-2010 at 09:02 AM.
 
Old 12-28-2010, 12:12 PM   #3
s2cuts
Member
 
Registered: Mar 2007
Posts: 61

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by tronayne View Post
Well, there is an alternative to shutdown; try init 0 instead (it'll go "right now," shutting down all the running processes (neatly) and then all the way to power off).

Hope this helps some.
What does "neatly" mean? Does it wait for all processes to finish and return a code? What if a process hangs?
 
Old 12-28-2010, 02:49 PM   #4
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060
Yes, init 0 stops all the daemons and other stuff that's running (or not running, as in "hung"). It's not nice to boneheads that leave the building with files opened in editors and the like (but, then, neither is shutdown when you think about it). The job is to cleanly stop whatever's running and power down; both do that.
 
Old 12-28-2010, 11:16 PM   #5
s2cuts
Member
 
Registered: Mar 2007
Posts: 61

Original Poster
Rep: Reputation: 18
Yeah, I guess I should have been more specific. I'm trying to differentiate between the kill signal 9 and the kill signal 15. I'm trying to figure out a neat way to send all processes / daemons a signal to terminate (TERM / kill 15), then pause for a predetermined amount of time allowing slow responding processes / daemons the chance to terminate on their own before dropping the hammer (kill 9). Is this even possible with one command?

And thanks for the suggestions to this point, in case I sound not grateful.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
getting "parameter has incomplete type" and "conflicting types" error yogi.aash Linux - Newbie 2 05-31-2010 06:25 PM
How do I disable "shutdown" and "restart" options in KDE logout screen for all users? maxgsp Linux - Distributions 1 12-12-2008 03:18 PM
Lost "Shutdown" and "Restart" From system menu in FC6 Nader1 Linux - Software 3 02-12-2007 04:40 PM
"Shutdown" and "Restart" option missing after upgrade hansalfredche Mandriva 8 11-02-2006 07:23 AM
Removing "shutdown" and "reboot" in logout window nearfar Red Hat 1 10-07-2003 11:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration