Re: [PATCH 2/6] kernel: add task_sigpending() helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/05, Jens Axboe wrote:
>
> @@ -4447,7 +4447,7 @@ SYSCALL_DEFINE0(pause)
>  		__set_current_state(TASK_INTERRUPTIBLE);
>  		schedule();
>  	}
> -	return -ERESTARTNOHAND;
> +	return task_sigpending(current) ? -ERESTARTNOHAND : -ERESTARTSYS;
>  }
>
>  #endif
> @@ -4462,7 +4462,7 @@ static int sigsuspend(sigset_t *set)
>  		schedule();
>  	}
>  	set_restore_sigmask();
> -	return -ERESTARTNOHAND;
> +	return task_sigpending(current) ? -ERESTARTNOHAND : -ERESTARTSYS;
>  }

Both changes are equally wrong. Why do you think sigsuspend() should ever
return -ERESTARTSYS ?

If get_signal() deques a signal, handle_signal() will restart this syscall
if ERESTARTSYS, this is wrong.

Oleg.




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux