Change position to call g_spawn_close_pid function.