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

Do not panic in OsIpcOneShotServer::new #350

Closed
xmakro opened this issue Aug 1, 2024 · 1 comment · Fixed by #351
Closed

Do not panic in OsIpcOneShotServer::new #350

xmakro opened this issue Aug 1, 2024 · 1 comment · Fixed by #351

Comments

@xmakro
Copy link
Contributor

xmakro commented Aug 1, 2024

Currently OsIpcOneShotServer::new can panic in (see code):

let temp_dir = tempfile::Builder::new().tempdir().unwrap();

It would be good to raise the error instead. This would require modifying UnixError to have a variant Io(io::Error). This makes the UnixError struct larger and non copyable, but UnixError is converted to io::Error later on, this might be okay.

If you agree with this change, I'd send a PR.

@jdm
Copy link
Member

jdm commented Aug 1, 2024

Agreed! I would merge a PR.

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 a pull request may close this issue.

2 participants