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

Bug#448406: tries to use pselect without checking for ENOSYS



Package: apt
Version: 0.7.8
Severity: serious

dpkgpm.cc:856 of aptbzr looks like:

         select_ret = pselect(max(master, _dpkgin)+1, &rfds, NULL, NULL,  
                              &tv, &original_sigmask);
         if (select_ret == 0)
            continue;
         else if (select_ret < 0 && errno == EINTR)
            continue;
         else if (select_ret < 0)
         {
            perror("select() returned error");
            continue;
         }

On systems with glibc 2.6, but without a kernel with the pselect
system call, select_ret will be ENOSYS, no system call will happen,
and the user is spammed with a select error message (tho pselect is
the culprit now).  So long as there is a timeout, the racy code in the
pselect() manpage can then be used to emulate pselect with select,
(signals could still be ignored for as long as long as the timeout
specified, but things should still work).

Most of the etch architecture did not ship with a pselect() system
call.




Reply to: