Can't ignore return value from write(), can cheat and use tvhwrite() which doesn't have attribute set (which itself is probably a mistake).