pm: Only register privileged processes with FS as needed

This commit is contained in:
Michael Scire
2018-11-08 05:28:52 -08:00
parent 9898a01d3b
commit cf510ad9bf
3 changed files with 19 additions and 6 deletions

View File

@@ -292,15 +292,15 @@ void Registration::FinalizeExitedProcess(std::shared_ptr<Registration::Process>
bool signal_debug_process_5x = kernelAbove500() && process->flags & PROCESSFLAGS_NOTIFYWHENEXITED;
/* Unregister with FS. */
if (R_FAILED(fsprUnregisterProgram(process->pid))) {
/* TODO: Panic. */
std::abort();
}
/* Unregister with SM. */
if (R_FAILED(smManagerUnregisterProcess(process->pid))) {
/* TODO: Panic. */
std::abort();
}
/* Unregister with LDR. */
if (R_FAILED(ldrPmUnregisterTitle(process->ldr_queue_index))) {
/* TODO: Panic. */
std::abort();
}
/* Close the process's handle. */