本文介绍了哪个系统调用可以返回EINTR或EAGAIN错误codeS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
下面哪个系统调用可以返回EINTR或EAGAIN / EWOULDBLOCK?
Which of the following system calls can return EINTR or EAGAIN/EWOULDBLOCK?
getsockname()
chdir()
bind()
fcntl()
listen()
setsid()
setsockopt()
socket()
stat()
unlink()
access()
accept()
open()
usleep()
dup2()
fork()
waitpid()
wait()
read()
write()
有些系统调用返回EINTR或EAGAIN出错(由手册页的API)。
Some of these system calls return EINTR or EAGAIN on error (by the API of man pages).
另外一些系统调用存在的API没有提及的EINTR / EAGAIN和返回然而这些。
Also some system calls exist that the API do not refer the EINTR/EAGAIN and however return these.
请帮忙。
推荐答案
我已经找到了答案。这个问题不应该被删除。作为一项规则只有系统调用这是慢返回EINTR。慢事情终端I / O和东西等待(选择,等待,睡眠,暂停等)。
I have found the answer. This question should not have been deleted. As a rule only syscalls which are "slow" return EINTR. Slow things are terminal I/O and things which wait (select, wait, sleep, pause, etc).
这篇关于哪个系统调用可以返回EINTR或EAGAIN错误codeS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!