免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1243 | 回复: 1
打印 上一主题 下一主题

[Linux] 请教flock出错时,errno的值 [复制链接]

论坛徽章:
2
技术图书徽章
日期:2014-02-24 10:31:04技术图书徽章
日期:2014-03-20 16:11:43
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-03-11 11:08 |只看该作者 |倒序浏览
请教flock出错时,errno的所有值,及含义。

论坛徽章:
2
技术图书徽章
日期:2014-02-24 10:31:04技术图书徽章
日期:2014-03-20 16:11:43
2 [报告]
发表于 2014-03-11 11:23 |只看该作者
哎,其实man一下就出来了,汗颜啊,怎么现在才知道
  1. RETURN VALUE
  2.        On success, zero is returned.  On error, -1 is returned, and errno is set appropriately.

  3. ERRORS
  4.        EBADF  fd is not a not an open file descriptor.

  5.        EINTR  While waiting to acquire a lock, the call was interrupted by delivery of a signal caught by a handler.

  6.        EINVAL operation is invalid.

  7.        ENOLCK The kernel ran out of memory for allocating lock records.

  8.        EWOULDBLOCK
  9.               The file is locked and the LOCK_NB flag was selected.
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP