make mcexec ignore garbage request
When a signal is forwarded from McKernel, ioctl(MCEXEC_UP_WAIT_SYSCALL) may return EINTR error. In this case, though no syscall request has been received, the mcexec starts to process the syscall requst that is garbage.
This commit is contained in:
@ -923,6 +923,10 @@ int main_loop(int fd, int cpu, pthread_mutex_t *lock)
|
||||
|
||||
while (((ret = ioctl(fd, MCEXEC_UP_WAIT_SYSCALL, (unsigned long)&w)) == 0) || (ret == -1 && errno == EINTR)) {
|
||||
|
||||
if (ret) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Don't print when got a msg to stdout */
|
||||
if (!(w.sr.number == __NR_write && w.sr.args[0] == 1))
|
||||
__dprintf("[%d] got syscall: %ld\n", cpu, w.sr.number);
|
||||
|
||||
Reference in New Issue
Block a user