TRQ-2950 - Check return value from fcntl() in pbsdsh