Skip to content

fix(posix): report spawn failures safely from the parent process - #159

Merged
jpnurmi merged 2 commits into
getsentryfrom
jpnurmi/fix/spawn-error-log
Jul 16, 2026
Merged

jpnurmi merged 2 commits into
getsentryfrom
jpnurmi/fix/spawn-error-log

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Jul 15, 2026 •

Copy link
Copy Markdown
Collaborator

Move spawn and exec failure logging out of the forked intermediate process. Exit with errno from the child and construct the failure message after waitpid returns in the parent. This keeps diagnostics such as "permission denied" handler startup failures visible without running the logging machinery in the intermediate forked child, which would be unsafe to forward to Sentry's logger.

Required for:

Move spawn and exec failure logging out of the forked intermediate
process. Exit with errno from the child and reconstruct the detailed
failure message after waitpid returns in the parent.

This keeps diagnostics such as permission-denied handler startup failures
visible without running Crashpad's logging machinery in a forked child of a
multithreaded process.

Co-Authored-By: OpenAI Codex <[email protected]>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6dbb145. Configure here.

Comment thread util/posix/spawn_subprocess.cc Resolved
@jpnurmi
jpnurmi merged commit 3680125 into getsentry Jul 16, 2026
28 checks passed
@jpnurmi
jpnurmi deleted the jpnurmi/fix/spawn-error-log branch July 16, 2026 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants