[serial] Adding flush on linux