Shall I have to handle all errno after Linux API or system call failed?

For example, if it failed to invoke msgsnd/msgrcv: 1. How to handle the errno – what is the best way? 2. What principle is applying to business product? 3. Shall I have to cover all of them? 4. What kinds of error must be handled? Do I have to write a signal handler for EINTR or something like this? Here's my straw-man code: RetVal = msgrcv(... ); if( RetVal == -1 ) { switch (errno) { case E2BIG: ... case EAGAIN: ... case EFAULT: ... case EIDRM: ... case EINTR: ... case EINVAL: ... case ENOMEM: ... default: ... }

以上就是Shall I have to handle all errno after Linux API or system call failed?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » CSS3 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏