diff options
author | 2007-07-20 04:26:48 +0000 | |
---|---|---|
committer | 2007-07-20 04:26:48 +0000 | |
commit | 82ea504def6eb144c2b13b315890b297e29345c5 (patch) | |
tree | b4623148e6feddde431fcb3b564342c5b0d64523 /zwgc/main.c | |
parent | 0feeeb3f9ce439f7bca5b691c7c681319a107a8e (diff) | |
parent | e6df42eaf361b9878e79ab8964aa26e1ddb95cef (diff) |
unpack of new upstream
Diffstat (limited to 'zwgc/main.c')
-rw-r--r-- | zwgc/main.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/zwgc/main.c b/zwgc/main.c index 151647e..52b9e7a 100644 --- a/zwgc/main.c +++ b/zwgc/main.c @@ -126,7 +126,6 @@ static void fake_startup_packet() notice.z_port = 0; notice.z_kind = ACKED; notice.z_auth = ZAUTH_YES; - notice.z_dest_galaxy = ZGetDefaultGalaxy(); sprintf(msgbuf,"Zwgc mark II version %s now running...", zwgc_version_string); notice.z_message = msgbuf; @@ -462,6 +461,12 @@ static RETSIGTYPE signal_child() errno = old_errno; } +/* rewrite the wgfile in case it has gone away */ +static RETSIGTYPE signal_usr1() +{ + write_wgfile(); +} + static void setup_signals(dofork) int dofork; { @@ -494,6 +499,9 @@ static void setup_signals(dofork) sa.sa_handler = signal_child; sigaction(SIGCHLD, &sa, (struct sigaction *)0); + sa.sa_handler = signal_usr1; + sigaction(SIGUSR1, &sa, (struct sigaction *)0); + #else /* !POSIX */ if (dofork) { /* Ignore keyboard signals if forking. Bad things will happen. */ @@ -511,6 +519,7 @@ static void setup_signals(dofork) signal(SIGHUP, signal_exit); signal(SIGCHLD, signal_child); signal(SIGPIPE, SIG_IGN); /* so that Xlib gets an error */ + signal(SIGUSR1, signal_usr1); #endif } |