adapt to unix, remove blocking