added basic methods to Bitset

This commit is contained in:
2018-09-08 05:15:51 +00:00
parent 1c996b5d95
commit 7bfba716f6
4 changed files with 101 additions and 10 deletions

View File

@ -293,7 +293,7 @@ int App::unset_signal_handler_no_mutex(int sig)
void App::on_guard_signal (int sig)
{
printf ("relaying %d to %d\n", sig, this->_guarded_child_pid);
printf ("relaying %d to %d\n", sig, (int)this->_guarded_child_pid);
::kill (this->_guarded_child_pid, sig);
}
@ -437,7 +437,7 @@ void App::unsubscribe_from_all_signals_no_mutex()
}
}
int App::guardProcess (const qse_mchar_t* proc_name, /* TODO: get the list of signals to relay??? */)
int App::guardProcess (const qse_mchar_t* proc_name, const Sigset& signals)
{
while (1)
{
@ -445,8 +445,8 @@ int App::guardProcess (const qse_mchar_t* proc_name, /* TODO: get the list of si
if (pid == -1) return -1;
if (pid == 0) break; // child
int _SigLink::State old_sig_states[QSE_NSIGS];
this->subscribeToAllSignals(true);
//int _SigLink::State old_sig_states[QSE_NSIGS];
//this->subscribeToAllSignals(true);
this->_guarded_child_pid = pid;