diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-07-06 14:58:34 -0400 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-07-06 14:58:34 -0400 |
| commit | 7c85a638b054f115cbb3c00d45e32cbf6db2a56c (patch) | |
| tree | 7e6907d4b75f98bf806ab805ac22aefb8dd753a6 /main.cpp | |
| parent | 68cc5ea523402a29dca414e285decc1a5d1a9c15 (diff) | |
| download | infinitytier-7c85a638b054f115cbb3c00d45e32cbf6db2a56c.tar.gz infinitytier-7c85a638b054f115cbb3c00d45e32cbf6db2a56c.zip | |
Added creation and periodic update of a file called "status" in the home directory that contains peer link status. Useful for debugging and statistics. Send it SIGHUP to force an update now. Otherwise it updates every 120 seconds.
Diffstat (limited to 'main.cpp')
| -rw-r--r-- | main.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -70,12 +70,18 @@ static void sighandlerQuit(int sig) static void sighandlerUsr(int sig) { } +static void sighandlerHup(int sig) +{ + Node *n = node; + if (n) + n->updateStatusNow(); +} #endif int main(int argc,char **argv) { #ifndef _WIN32 - signal(SIGHUP,SIG_IGN); + signal(SIGHUP,&sighandlerHup); signal(SIGPIPE,SIG_IGN); signal(SIGUSR1,&sighandlerUsr); signal(SIGUSR2,&sighandlerUsr); |
