Commit d65c5c74 authored by Christian Hergert's avatar Christian Hergert
Browse files

subprocess: check for cancelled after connecting

We need to ensure that we don't race here (while it's unlikely). So we
can just hit the force exit path if we detect a cancellation after we
have subscribed.
parent 6a2bf967
......@@ -1520,13 +1520,15 @@ ide_breakout_subprocess_initable_init (GInitable *initable,
IDE_TRACE_MSG ("HostCommand() spawned client_pid %u", (guint)client_pid);
if (cancellable != NULL)
if (cancellable != NULL && !g_cancellable_is_cancelled (cancellable))
g_signal_connect_object (cancellable,
G_CALLBACK (ide_breakout_subprocess_cancelled),
if (g_cancellable_is_cancelled (cancellable) && !self->client_has_exited)
ide_breakout_subprocess_force_exit (IDE_SUBPROCESS (self));
ret = TRUE;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment