Todd C. Miller <todd.mil...@sudo.ws> wrote:

> On Fri, 18 Jun 2021 15:17:47 -0600, "Theo de Raadt" wrote:
> 
> > OK.  How any pieces of code were found which do that?
> >
> > I mean, code search for ' = alarm('
> 
> In our tree?  Just ksh.
> 
> static void
> alarm_catcher(int sig)
> {
>         int errno_ = errno;
> 
>         if (ksh_tmout_state == TMOUT_READING) {
>                 int left = alarm(0);
> 
>                 if (left == 0) {
>                         ksh_tmout_state = TMOUT_LEAVING;
>                         intrsig = 1;
>                 } else
>                         alarm(left);
>         }
>         errno = errno_;
> }

Would the proposal to return UINT_MAX not break this code (which
stores it in int), and does the current return value of 0 not
actually make this code do the right thing?

Reply via email to