nameservice: check return value of fcntl