fix stderr/stdout chan race