Skip to content

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

Merged
stevenengler merged 1 commit intoshadow:mainfrom
stevenengler:plugin-stdout
Feb 7, 2023
Merged

Set shim's stdout/stderr to the shim log file#2725
stevenengler merged 1 commit intoshadow:mainfrom
stevenengler:plugin-stdout

Conversation

@stevenengler
Copy link
Copy Markdown
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
Copy Markdown
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.

2 participants