[bugfix] read/write should set 0 as default hup

Change-Id: I56ac5784819b1956d9c27a6cae0d2f3dd246a9af