Re: Transferring ownership of SSH connection from process A to B, letting A quit nicely?

2021-08-11 Thread mid
On Wednesday, August 11th, 2021 at 7:57 AM, m brandenberg wrote: > Check msg.msg_flags here. I think you will receive a hint. msg_flags is always zero. Seems okay, after all, the FDs are received correctly.

Re: Transferring ownership of SSH connection from process A to B, letting A quit nicely?

2021-08-11 Thread Philip Guenther
On Tue, Aug 10, 2021 at 12:13 PM mid wrote: > On Monday, August 9th, 2021 at 5:36 AM, Philip Guenther < > guent...@gmail.com> wrote: > > > If you're 100% sure you have it right, then it should be easy to provide > a > > program that demonstrates > > 1. passing an fd between processes > > 2.

Re: Transferring ownership of SSH connection from process A to B, letting A quit nicely?

2021-08-11 Thread m brandenberg
On Tue, 10 Aug 2021, mid wrote: len = recvmsg(socket, , 0); if(len <= 0) { return -1; } Check msg.msg_flags here. I think you will receive a hint. -- Monty Brandenberg

Re: Transferring ownership of SSH connection from process A to B, letting A quit nicely?

2021-08-10 Thread mid
On Monday, August 9th, 2021 at 5:36 AM, Philip Guenther wrote: > If you're 100% sure you have it right, then it should be easy to provide a > program that demonstrates > 1. passing an fd between processes > 2. using it successfully in the receiving process > 3. the sending process exiting >

Re: Transferring ownership of SSH connection from process A to B, letting A quit nicely?

2021-08-08 Thread Philip Guenther
On Sun, Aug 8, 2021 at 10:13 AM mid wrote: ... > I have tried sending the file descriptors associated with the connection > to process B via sendmsg, thinking that maybe the > file descriptors are reference-counted. It's a logical > assumption, but it didn't work - the connection closed with >

Transferring ownership of SSH connection from process A to B, letting A quit nicely?

2021-08-08 Thread mid
Hello. I have an interesting conundrum I'm dealing with, and would like some ideas on getting it to work. I'm making a useless service for recreational purposes, and it involves holding many SSH connections at once. Ideally said service should be composed of only one process, accepting multiple