move close_callback to s_bsd and use it everywher