diff options
author | Roger Dingledine <arma@torproject.org> | 2004-11-12 04:59:37 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-11-12 04:59:37 +0000 |
commit | 90e0ad517e1f1cd98f523922f7b55d2a8c0a3af5 (patch) | |
tree | a0bd7a2f4576c5be72301e396703192f51daa27b /src/or | |
parent | c106ab8315c1bda4b537314e84603fa60f142553 (diff) | |
download | tor-90e0ad517e1f1cd98f523922f7b55d2a8c0a3af5.tar tor-90e0ad517e1f1cd98f523922f7b55d2a8c0a3af5.tar.gz |
dfc caught a SIGXFSZ error when his debugfile reached 2GB.
so if they exist, catch them and ignore them.
write() will fail normally and we'll look at errno like
normal human beings.
svn:r2804
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c index 71fb293fa..4af4c818a 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -872,6 +872,10 @@ static void catch(int the_signal) { case SIGCHLD: please_reap_children = 1; break; +#ifdef SIGXFSZ + case SIGXFSZ: /* this happens when write fails with etoobig */ + break; /* ignore; write will fail and we'll look at errno. */ +#endif default: log(LOG_WARN,"Caught signal %d that we can't handle??", the_signal); tor_cleanup(); @@ -983,6 +987,9 @@ void handle_signals(int is_parent) sigaction(SIGPIPE, &action, NULL); /* otherwise sigpipe kills us */ sigaction(SIGUSR1, &action, NULL); /* dump stats */ sigaction(SIGHUP, &action, NULL); /* to reload config, retry conns, etc */ +#ifdef SIGXFSZ + sigaction(SIGXFSZ, &action, NULL); /* handle file-too-big resource exhaustion */ +#endif if(is_parent) sigaction(SIGCHLD, &action, NULL); /* handle dns/cpu workers that exit */ #endif /* signal stuff */ |