Fixes in tcp connect return value and implement 2> pipes