Support SIGSTOP and SIGCONT

This commit is contained in:
Masamichi Takagi
2014-09-10 16:23:38 +09:00
parent b50e205a61
commit 2325d47952
3 changed files with 57 additions and 1 deletions

View File

@@ -51,6 +51,7 @@
#define PS_UNINTERRUPTIBLE 0x4
#define PS_ZOMBIE 0x8
#define PS_EXITED 0x10
#define PS_STOPPED 0x20
#define PS_NORMAL (PS_INTERRUPTIBLE | PS_UNINTERRUPTIBLE)

View File

@@ -367,6 +367,18 @@ rescan:
if (ret != pid)
kprintf("WARNING: host waitpid failed?\n");
goto exit;
} else if(child->status == PS_STOPPED) {
ihk_mc_spinlock_unlock_noirq(&child->lock);
ihk_mc_spinlock_unlock_noirq(&proc->ftn->lock);
/* exit_status is created in do_signal */
if (status) {
*status = child->exit_status;
}
pid = child->pid;
dkprintf("wait4,PS_STOPPED,pid=%d,status=%08x\n", pid, *status);
goto exit;
}