Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set shim's stdout/stderr to the shim log file #2725

Merged
merged 1 commit into from
Feb 7, 2023

Conversation

stevenengler
Copy link
Contributor

@stevenengler stevenengler commented Feb 6, 2023

Shadow now uses an fd passed through fork/exec for the shim log rather than passing a filename using SHADOW_LOG_FILE, and also uses this fd for stdout and stderr.

If the shim writes to stdout/stderr (or the plugin disables interposition and writes to stdout/stderr), it should be written to the shim log rather than to shadow's stdout/stderr (which may be the terminal or some other file).

@sporksmith If this overlaps with your Thread migration let me know and I'll hold off on merging.

@stevenengler stevenengler self-assigned this Feb 6, 2023
@github-actions github-actions bot added Component: Libraries Support functions like LD_PRELOAD and logging Component: Main Composing the core Shadow executable labels Feb 6, 2023
Copy link
Contributor

@sporksmith sporksmith left a comment

Choose a reason for hiding this comment

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

It overlaps a bit, but that's ok

Shadow now uses an fd passed through fork/exec for the shim log rather than
passing a filename using `SHADOW_LOG_FILE`, and also uses this fd for stdout
and stderr.

If the shim writes to stdout/stderr (or the plugin disables interposition and
writes to stdout/stderr), it should be written to the shim log rather than to
shadow's stdout/stderr (which may be the terminal or some other file).
@stevenengler stevenengler merged commit 658a922 into shadow:main Feb 7, 2023
@stevenengler stevenengler deleted the plugin-stdout branch February 7, 2023 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Libraries Support functions like LD_PRELOAD and logging Component: Main Composing the core Shadow executable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants