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

fs: use dup/dup2 for stdio hide and restore #597

Merged
merged 6 commits into from
Nov 20, 2022
Merged

Conversation

sreimers
Copy link
Member

No description provided.

src/sys/fs.c Outdated Show resolved Hide resolved
@sreimers sreimers marked this pull request as ready for review November 19, 2022 16:36
@alfredh
Copy link
Contributor

alfredh commented Nov 19, 2022

I tested with retest and the "OK" is not printed:

$ ./retest -r
retest: libre version 2.9.0 (x86_64/Darwin)
using async polling method 'kqueue'
regular tests:       Alfreds-MBP:retest alfredh$ 

is the restore function working ?

@sreimers
Copy link
Member Author

Thanks for testing on macOS, will try to debug, on Linux it works fine and better than freopen. Needs more testing on Windows too.

@sreimers sreimers marked this pull request as draft November 19, 2022 19:20
@sreimers
Copy link
Member Author

ok, retest restore is broken on linux too, so I think we have to fix the usage in retest. Simple usage like here https://github.com/baresip/baresip/blob/main/modules/portaudio/portaudio.c#L306-L308 works fine.

@sreimers sreimers marked this pull request as ready for review November 19, 2022 19:56
@alfredh
Copy link
Contributor

alfredh commented Nov 20, 2022

this one is good to go

@sreimers sreimers merged commit b59bdda into main Nov 20, 2022
@sreimers sreimers deleted the rewrite_stdio_hide branch November 20, 2022 12: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