简体   繁体   中英

What does EAGAIN mean?

在标题中,EAGAIN是什么意思?

EAGAIN is often raised when performing non-blocking I/O . It means "there is no data available right now, try again later" .

It might (or might not ) be the same as EWOULDBLOCK , which means "your thread would have to block in order to do that" .

Using man 2 intro | less -Ip EAGAIN man 2 intro | less -Ip EAGAIN :

     35 EAGAIN Resource temporarily unavailable.  This is a temporary condi-
         tion and later calls to the same routine may complete normally.

What it means is less important. What it implies:

  • your system call failed
  • nothing happened (system calls are atomic, and this one just did not happen)
  • you could try it again (it could fail again , possibly with a different result)
  • or you could choose otherwise.

The whole thing about EAGAIN is that your process is not blocked inside the system call; it has the right to choose: either retry or do something useful.

根据这个 ,它的意思是“操作会导致进程暂停。”

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM