fixed issue with read timeout detection for pdksh / mksh