launch_daemon: Do not return errors from RegisterExternalEvent.

We will pick up events that have no match later on, and if we return
an error here, it will prevent the job from being initialized, which
we definitely do not want.

Fixes #17291.
This commit is contained in:
Augustin Cavalier 2021-09-30 13:25:54 -04:00
parent 63b76faeea
commit 7f4c5a1fe7

View File

@ -438,7 +438,13 @@ LaunchDaemon::RegisterExternalEvent(Event* event, const char* name,
break;
}
}
return status;
TRACE("Register external event '%s': %" B_PRId32 "\n", name, status);
// Even if we failed to find a matching source, we do not want to return an error,
// as that will be propagated up the chain and prevent this job from being instantiated.
// Jobs will be re-scanned later for unregistered external events.
return B_OK;
}