[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] if we"re hibernating and we get a sigint, exit immediately.
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] if we"re hibernating and we get a sigint, exit immediately.
- From: arma@xxxxxxxx (Roger Dingledine)
- Date: Thu, 10 Feb 2005 02:34:21 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Thu, 10 Feb 2005 02:34:42 -0500
- Reply-to: or-dev@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or
Modified Files:
hibernate.c
Log Message:
if we're hibernating and we get a sigint, exit immediately.
closes bug 91.
Index: hibernate.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/hibernate.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- hibernate.c 2 Feb 2005 06:28:45 -0000 1.44
+++ hibernate.c 10 Feb 2005 07:34:19 -0000 1.45
@@ -657,9 +657,11 @@
static void hibernate_begin(int new_state, time_t now) {
connection_t *conn;
- if (hibernate_state == HIBERNATE_STATE_EXITING) {
- /* we've been called twice now. close immediately. */
- log(LOG_NOTICE,"Second sigint received; exiting now.");
+ if (new_state == HIBERNATE_STATE_EXITING &&
+ hibernate_state != HIBERNATE_STATE_LIVE) {
+ log(LOG_NOTICE,"Sigint received %s; exiting now.",
+ hibernate_state == HIBERNATE_STATE_EXITING ?
+ "a second time" : "while hibernating");
tor_cleanup();
exit(0);
}