disconnect before forking