The initial problem sparking this effort was that even configuration errors were not propagated back to the init script. Fixig that is possible by modifying shibd.cpp alone. However, one shouldn't assume that the ListenerService initialization is always successful, as socket creation and binding may fail as well.
Such errors are logged by the standard mechanism, but at least their presence should be signalled to the top level. In the attached patch this is achieved by employing the USR1 signal, which is rather alien in its environment, but was readily possible without changing the interface, like for example extending the shutdown flag.
If it would be possible to delay the creation of the StorageService cleanup thread, the whole daemonization dance could be consolidated into a single function invoked right before running the listener.
The RedHat init script should also be modified to accomodate the new shibd behaviour. This may be as easy as removing the &.
The initial problem sparking this effort was that even configuration
errors were not propagated back to the init script. Fixig that is
possible by modifying shibd.cpp alone. However, one shouldn't assume
that the ListenerService initialization is always successful, as
socket creation and binding may fail as well.
Such errors are logged by the standard mechanism, but at least their
presence should be signalled to the top level. In the attached patch
this is achieved by employing the USR1 signal, which is rather alien
in its environment, but was readily possible without changing the
interface, like for example extending the shutdown flag.
If it would be possible to delay the creation of the StorageService
cleanup thread, the whole daemonization dance could be consolidated
into a single function invoked right before running the listener.
The RedHat init script should also be modified to accomodate the
new shibd behaviour. This may be as easy as removing the &.