Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 252 Vote(s) - 3.56 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Which functions are interrupted by signals even with SA_RESTART?

#1
Is there any reasonably complete list of which functions in POSIX are interrupted with `EINTR` when a signal is received or handled, even if there is no signal handler or if the handler was installed with `SA_RESTART`? Some examples:

- `select`
- `nanosleep`
- etc.
Reply

#2
POSIX says:

> If the signal-catching function executes a return statement, the behavior of the interrupted function shall be as described individually for that function, except as noted for unsafe functions.

So, either you look through all functions individually or filter your man pages for EINTR and POSIX. I did the latter and got:

accept,
aio_suspend,
catclose,
catgets,
chmod,
chown,
clock_nanosleep,
close,
closedir,
connect,
dup,
errno,
exec,
fallocate,
fchdir,
fchmod,
fchown,
fclose,
fcntl,
fflush,
fgetc,
fgetwc,
fopen,
fork,
fputc,
fputwc,
freopen,
fseek,
fsetpos,
fsync,
ftruncate,
getgrent,
getgrgid,
getgrnam,
getmsg,
getpwent,
getpwnam,
getpwuid,
ioctl,
lchown,
lio_listio,
lockf,
mq_open,
mq_receive,
mq_send,
msgop,
msgrcv,
msgsnd,
nanosleep,
open,
pause,
pclose,
poll,
posix_fallocate,
posix_mem_offset,
posix_trace_create,
posix_trace_get_filter,
posix_trace_getnext_event,
posix_trace_open,
posix_trace_start,
posix_typed_mem_get_info,
posix_typed_mem_open,
printf,
pthread_atfork,
pthread_attr_getdetachstate,
pthread_attr_getguardsize,
pthread_attr_getinheritsched,
pthread_attr_getschedparam,
pthread_attr_getschedpolicy,
pthread_attr_getscope,
pthread_attr_getstack,
pthread_attr_getstackaddr,
pthread_attr_getstacksize,
pthread_attr_init,
pthread_barrier_init,
pthread_barrier_wait,
pthread_barrierattr_getpshared,
pthread_barrierattr_init,
pthread_cancel,
pthread_cleanup_push,
pthread_cond_init,
pthread_cond_signal,
pthread_cond_wait,
pthread_condattr_getclock,
pthread_condattr_getpshared,
pthread_condattr_init,
pthread_create,
pthread_detach,
pthread_equal,
pthread_getconcurrency,
pthread_getschedparam,
pthread_getspecific,
pthread_join,
pthread_key_create,
pthread_key_delete,
pthread_kill,
pthread_mutex_getprioceiling,
pthread_mutex_init,
pthread_mutex_lock,
pthread_mutex_timedlock,
pthread_mutexattr_getprioceiling,
pthread_mutexattr_getprotocol,
pthread_mutexattr_getpshared,
pthread_mutexattr_gettype,
pthread_mutexattr_init,
pthread_once,
pthread_rwlock_init,
pthread_rwlock_rdlock,
pthread_rwlock_timedrdlock,
pthread_rwlock_timedwrlock,
pthread_rwlock_unlock,
pthread_rwlock_wrlock,
pthread_rwlockattr_getpshared,
pthread_rwlockattr_init,
pthread_self,
pthread_setschedprio,
pthread_spin_init,
pthread_spin_lock,
pthread_spin_unlock,
pthread_testcancel,
putmsg,
read,
recv,
recvfrom,
recvmsg,
scanf,
select,
select_tut,
sem_open,
sem_timedwait,
sem_wait,
semop,
send,
sendmsg,
sendto,
shm_open,
sigaction,
siginterrupt,
sigpause,
sigprocmask,
sigset,
sigsuspend,
sigvec,
sigwaitinfo,
statfs,
statvfs,
system,
tcdrain,
tcsetattr,
tmpfile,
truncate,
ualarm,
usleep,
wait,
waitid and
write
Reply

#3
tcsetattr is also not restartable, at least in Linux 2.6.18
Reply

#4
If anyone wonders, the [manpage for `signal(7)`][1] has more detail on what is and what isn't restarted:


[1]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through