stupid errors
ptyRead should have returned num chars read