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

Support for reconnecting to an existing pipe #306

Open
endocrimes opened this issue Nov 20, 2023 · 1 comment
Open

Support for reconnecting to an existing pipe #306

endocrimes opened this issue Nov 20, 2023 · 1 comment

Comments

@endocrimes
Copy link

It is fairly common that software will create pipes and then need to re-connect to them later (an example being when using a fifo for streaming logs between processes, and wanting the listener to be able to re-listen in case of a crash or upgrade).

The Pipe API in go-winio unfortunately doesn't support this - as the ListenPipe function will attempt to create the FIFO - and error when it already exists.

I ended up forking go-winio to add a hacky function for this in 2019 (main...endocrimes:go-winio:dani/safe-relisten#diff-c9a2c1c22d0d0cb9afa231de2930c35096c8cda653a3d6fc94e159bfdcd71b7f) that has been in production use in Nomad since then (hashicorp/nomad#5864) - but due to my lack of deep knowledge of Windows API never opened a PR here at the time without knowing how stable it would be.

Today, I find myself needing to use my fork in a different project, and so now I'd like to try and land this upstream 😅

(I also noticed that someone actually opened a PR with those changes in 2020, but nobody ever got around to reviewing them #170 - I'm happy to open a new PR if this is something that folks would like to add).

@esimkowitz
Copy link

+1 this PR has been open forever, would love to get it merged...

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

No branches or pull requests

2 participants