Skip to content

macOS: Child processes hang on WaitForExit after creating AvaloniaCefBrowser #224

@berkansasmaz

Description

@berkansasmaz

Hi, I’m seeing a consistent hang on macOS only when an Avalonia+CefGlue browser is created in our app. In the official CefGlue Avalonia demo this does not happen.

Environment

OS: macOS 15.6 (ARM64)
.NET: 9.0
Avalonia: 11.0.12
CefGlue packages: CefGlue.Avalonia/CefGlue.Common ~ 120.6099.211
App type: Avalonia desktop
Hardware: Apple Silicon (M-series)

What happens

After creating an AvaloniaCefBrowser (Cef initialized), starting any child process and waiting for exit will sometimes never complete. This reproduces with both:

  • .NET Process API using UseShellExecute = true and Process.WaitForExit()
  • CliWrap’s ExecuteAsync(...).WaitUntilExitAsync (same outcome, indefinite wait)

If we never create the browser, the exact same child process execution completes and WaitForExit/WaitExitAsync returns as expected.

Expected

Child processes exit and WaitForExit completes, regardless of whether CEF is initialized.

Observed

On macOS, once the browser is created, WaitForExit hangs indefinitely. Killing the child process programmatically sometimes still leaves the wait stuck.

Questions

  • Does CefGlue/CEF modify any process/signal behavior on macOS that could explain .NET WaitForExit getting stuck (e.g., SIGCHLD handling)?
  • Is there a recommended initialization pattern or flag set on macOS to avoid interfering with child-process lifecycle/exit notifications?
  • Any guidance to further isolate what in CEF init could cause this difference vs the demo?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions