Killing the job

This commit is contained in:
Ben Pig Chu 2020-07-03 17:31:28 +08:00
parent 434b7682f6
commit d24c8ae98b
1 changed files with 2 additions and 3 deletions

View File

@ -194,9 +194,8 @@ impl Syscall<'_> {
info!("task.kill: handle={:?}", handle);
let proc = self.thread.proc();
if let Ok(_job) = proc.get_object_with_rights::<Job>(handle, Rights::DESTROY) {
// job.kill();
return Err(ZxError::WRONG_TYPE);
if let Ok(job) = proc.get_object_with_rights::<Job>(handle, Rights::DESTROY) {
job.kill();
} else if let Ok(process) = proc.get_object_with_rights::<Process>(handle, Rights::DESTROY)
{
if Arc::ptr_eq(&process, &proc) {