proper error handling for fcntl F_GETOWN on modern kernels

on old kernels, there's no way to detect errors; we must assume
negative syscall return values are pgrp ids. but if the F_GETOWN_EX
fcntl works, we can get a reliable answer.
This commit is contained in:
Rich Felker
2012-06-20 22:16:47 -04:00
parent e5fb6820a4
commit 4e8b0938d9
5 changed files with 29 additions and 1 deletions
+3
View File
@@ -31,3 +31,6 @@
#define F_GETLK 12
#define F_SETLK 13
#define F_SETLKW 14
#define F_SETOWN_EX 15
#define F_GETOWN_EX 16