Turns out USR1 is reserved by the JVM on pretty much every platform but Mac, so only expose USR2 for

injected handling by subclasses.

I had a nice version of this that allowed user controlled handling for any signal to be injected.
Unfortunately it used multibindings from guice, and I'm loathe to add a dependency to narya just for
that.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5980 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Charlie Groves
2009-10-21 20:47:55 +00:00
parent 9284f1b4b6
commit 90c97a54b3
4 changed files with 4 additions and 35 deletions
@@ -22,8 +22,6 @@
package com.threerings.presents.server;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import static com.threerings.presents.Log.log;
/**
@@ -73,14 +71,6 @@ public abstract class AbstractSignalHandler
log.info(_repmgr.generateReport(ReportManager.DEFAULT_TYPE));
}
protected void usr1Received ()
{
if (_usr1receiver != null) {
_usr1receiver.received();
}
}
protected void usr2Received ()
{
if (_usr2receiver != null) {
@@ -88,8 +78,7 @@ public abstract class AbstractSignalHandler
}
}
@Inject(optional=true) @Named(SignalReceiver.USR1) protected SignalReceiver _usr1receiver;
@Inject(optional=true) @Named(SignalReceiver.USR2) protected SignalReceiver _usr2receiver;
@Inject(optional=true) protected SignalReceiver _usr2receiver;
@Inject protected PresentsServer _server;
@Inject protected ReportManager _repmgr;
}