Skip to content

Conversation

@arrowmaster
Copy link
Contributor

Prevent any output on non verbose nix builds and only output to stderr on verbose builds to avoid introducing unexpected output from non unity processes that UnityDoorstop gets injected into.

The behavior can be observed in 4.4.0 and 4.4.1 with the following test case.

$ DOORSTOP_ENABLED=1 LD_PRELOAD=./libdoorstop.so cat <(echo "This should be the only output")
Failed to hook dlsym, ignoring it. Error: no such function: dlsym
Failed to hook dup2, ignoring it. Error: no such function: dup2
This should be the only output

Copy link
Collaborator

@ManlyMarco ManlyMarco left a comment

Choose a reason for hiding this comment

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

Looks good to me. The newlines are still added, right?

@arrowmaster
Copy link
Contributor Author

Looks good to me. The newlines are still added, right?

Yes the newlines are added by the LOG function so they were removed in the lines that were changed from printf to LOG.

The output shown in #88 is actually from this build. It didn't solve the problem I was trying to solve but its still a necessary step and got me further in troubleshooting.

@ManlyMarco ManlyMarco merged commit a93c3fe into NeighTools:master Oct 17, 2025
4 checks passed
@arrowmaster arrowmaster deleted the patch-stderr branch October 22, 2025 15:26
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