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.
5 files changed