poll/select not async-signal safe

poll/select not async-signal safe

Post by Sony E Anton » Fri, 27 Sep 2002 13:15:58



Was looking AUPUE for the list of 80 or so system calls that are
async-signal safe. poll()/select(0 were not among them.

Does anybody know why any system calls should not be async-signal safe,
when they are MT-safe.

--sony

 
 
 

poll/select not async-signal safe

Post by Ryan Younc » Sat, 28 Sep 2002 03:57:02



Quote:> Was looking AUPUE for the list of 80 or so system calls that are
> async-signal safe. poll()/select(0 were not among them.
> Does anybody know why any system calls should not be async-signal safe,
> when they are MT-safe.

select() and poll() were not defined by Posix as being async-signal-safe when
Stevens wrote APUE (1992).

However, Posix.1-2001 does define them as such.

        Ryan

 
 
 

poll/select not async-signal safe

Post by Sony E Anton » Sat, 28 Sep 2002 08:56:56




>>Was looking AUPUE for the list of 80 or so system calls that are
>>async-signal safe. poll()/select(0 were not among them.

>>Does anybody know why any system calls should not be async-signal safe,
>>when they are MT-safe.

> select() and poll() were not defined by Posix as being async-signal-safe when
> Stevens wrote APUE (1992).

> However, Posix.1-2001 does define them as such.

Ah ha that s interesting, thanks. I was kind of treating AUPUE as a bible.

By the way is there any system call that is not async-signal unsafe

--sony

Quote:

>    Ryan

 
 
 

poll/select not async-signal safe

Post by David Schwart » Sat, 28 Sep 2002 08:53:01



> By the way is there any system call that is not async-signal unsafe

        Likely not, but poll and select are not required to be system calls.
It's possible, for example, that 'select' is a user-space wrapper around
'poll'.

        DS