开发者

Fcntl() question about process id

I am debugging some code and there is l_pid = 0 always for setting file locks.. It seems odd to me.. Is this correct?Documentation d开发者_如何学运维oesnt say about 0 zero value ..


l_pid is only meaningful when getting the lock status with F_GETLK; when setting a lock, if it succeeds then you know what pid owns it. :) (And the buffer is returned unmodified it it fails.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜