climateprediction.net (CPDN) home page
Thread 'Models and Unix/Linux shutdown'

Thread 'Models and Unix/Linux shutdown'

Message boards : Number crunching : Models and Unix/Linux shutdown
Message board moderation

To post messages, you must log in.

AuthorMessage
Steve Bergman

Send message
Joined: 5 Aug 08
Posts: 22
Credit: 501,217
RAC: 0
Message 34645 - Posted: 15 Aug 2008, 17:24:07 UTC

I was reading a thread where a user mentioned that they had boinc installed from their OS repository, so it had start and stop scripts which got run during system boot up and shutdown. This got me to wondering exactly what the shutdown script did. On my Ubuntu box, it looks like it treats it like any other service. It sends a sigterm (signal 15) to the process. The process is expected to catch this signal, perform any cleanup that it needs to do, and exit.

At the end of the system shutdown procedure, all remaining processes are sent a sigterm, and the system waits 5 seconds to give them a chance to clean up. It then sends a sigkill (signal 9) which is the ipc equivalent of a beheading, and halts the machine.

How do the climate models respond to signal 15? Do they catch it and do clean up before terminating?
ID: 34645 · Report as offensive     Reply Quote
ProfileThyme Lawn
Volunteer moderator

Send message
Joined: 5 Aug 04
Posts: 1283
Credit: 15,824,334
RAC: 0
Message 34647 - Posted: 15 Aug 2008, 19:50:16 UTC - in response to Message 34645.  

How do the climate models respond to signal 15? Do they catch it and do clean up before terminating?

There\'s a signal handler built in to the BOINC client which gracefully terminates all running projects (on SIGHUP, SIGINT, SIGQUIT, SIGTERM or SIGPWR).
"The ultimate test of a moral society is the kind of world that it leaves to its children." - Dietrich Bonhoeffer
ID: 34647 · Report as offensive     Reply Quote

Message boards : Number crunching : Models and Unix/Linux shutdown

©2024 cpdn.org