Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-30-2008, 06:16 AM   #1
Registered: Sep 2008
Location: Calcutta,India
Distribution: Fedora 11, OpenSUSE 11.0
Posts: 116

Rep: Reputation: 17
Question shutdown query

hello friends
yesterday i read a book named LINUX COMMAND REFERENCE by pffafenberger published by sybex international.

"Shutdown command should be used when you are logged out of the Xsession"
----i found this statement while going through that book

What i wish to know is......does this makes any difference to a proper shutdowning whether or not i am in the Xsession???
i have also googled a lot abt this....but nobody has mentioned abt the significance or insignificance of the Xsesion for the shutdown command..
looking forward 4 ur suggestions to clear my confusion.
thank u

Last edited by ritam_bkp; 09-30-2008 at 06:17 AM.
Old 09-30-2008, 06:43 AM   #2
Senior Member
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
What a strange statement. 'shutdown' will switch the system to runlevel 0 (stop) or runlevel 6 (reboot) depending on the arguments. An xsession will not interfere at all with shutdown doing its job. Going back over a decade and onto UNIX systems, you could have maybe 40 or more people connected to a mainframe and all using X - so there you've got 40 X sessions. Now the admin logs onto X as a normal user, runs 'su' (or whatever mechanism that UNIX had - 'wheel' group or whatever), fiddles around with the system, then invokes shutdown with, say, a 5 minute wait and messages broadcast to users every 30 seconds. The admin then logs out and goes for a cup of coffee. The users don't necessarily log out; maybe they were talking to someone or ran off to grab a coffee too - the system boots them all off and shuts down (or restarts) anyway. It would be outright stupid to require all X sessions to be closed first - how can you possibly do that when anyone can log in from any terminal in the building/campus/planet?

Now when the system is shutting down, SIGINT will be broadcast to all running applications. Applications should respond by saving any work and closing in a sensible way. Of course applications that don't handle SIGINT simply die. After some set amount of time, SIGKILL is sent to any processes which are still running. 'init' is now the sole process running and it continues to go through its list of things to do to shut down (sync HDs, unmount filesystems, unload modules, park HD heads, switch off computer).
Old 09-30-2008, 06:56 AM   #3
Registered: Sep 2008
Location: Calcutta,India
Distribution: Fedora 11, OpenSUSE 11.0
Posts: 116

Original Poster
Rep: Reputation: 17
thanx a lot...
that was a lot of help...
i guess when we click on the shutdown button it runs the shutdown -h now command and it is ofcourse in the i think the author might have mesed up in this matter

thanx once again


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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
interesting MySQL query/view query :s mjh Programming 3 03-25-2008 07:30 AM
mysql use output of one query in another query secretlydead Programming 2 11-19-2007 01:25 AM
help with mysql query: return nth rows in query hawarden Programming 2 07-31-2006 06:36 PM
Please help on how to save services shutdown or shutdown from the terminal. wambuzz Linux - General 2 03-11-2005 07:38 AM
konsole shutdown possible? or key combo = shutdown possible? Laptop2250 Linux - Newbie 3 11-16-2003 10:44 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:01 AM.

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