O Linux segue as convenções do System V, por padrão, terminando em SIGIO?

1

No livro Unix Network Programming, há a seguinte declaração:

We should establish the signal handler before setting the owner of the socket. Under Berkeley-derived implementations, the order of the two function calls does not matter because the default action is to ignore SIGIO. Therefore, if we were to reverse the order of the two function calls, there is a small chance that a signal could be generated after the call to fcntl but before the call to signal; if that happens, the signal is just discarded. Under SVR4, however, SIGIO is defined to be SIGPOLL in the header and the default action of SIGPOLL is to terminate the process. Therefore, under SVR4, we want to be certain the signal handler is installed before setting the owner of the socket.

No arquivo signal.h no kernel do Linux, o comportamento POSIX, que segue o System V, é citado como um comentário :

*   +--------------------+------------------+
 *  |  POSIX signal      |  default action  |
 *  +--------------------+------------------+
 *  |  SIGHUP            |  terminate   |
 *  |  SIGINT            |  terminate   |
   ....
 *  |  SIGPROF           |  terminate   |
 *  |  SIGPOLL/SIGIO     |  terminate   |
 *  |  SIGSYS/SIGUNUSED  |  coredump    |
 *  |  SIGSTKFLT         |  terminate   |
   .... etc.

No entanto, não encontrei nenhum lugar na origem em que essa política foi realmente implementada. Não parecia haver nenhuma equação de configuração SIGIO igual a SIGPOLL. Então, o Linux segue o comportamento de Berkeley ou o comportamento do System V?

    
por Tyler Durden 08.07.2017 / 19:36

1 resposta

2

#define SIGIO       29
#define SIGPOLL SIGIO

link

    
por 08.07.2017 / 20:06