-
Notifications
You must be signed in to change notification settings - Fork 38
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
Confusing mix of references and absolutes in various function calls #163
Comments
I think you could use BTW, |
Firstly, thanks for the super-fast response. I had tried into_inner, try_unwrap, etc. in my own drop i.e. Drop the line 93: Arc::<Session>::into_inner(self._session.clone()).unwrap();
Secondly, I am connecting to an openssh server on a windows box and regular drop does not shut the session. So I suspected some form of error, and hence went on this route. |
About that, I think it's time for me to add optional tracing support to log these errors in drop. |
Maybe there're have some Command/Child/ChildStd* that reference the |
Indeed -- that's just a command that builds of a session -- typical case let mut cmd = session
.clone()
.arc_raw_command(
program
.display().to_string()
); But I tired by hashing it out -- issue remains Are the functions such as |
Ok so -- just noticed the sessions are going into TIME/CLOSE/FIN WAIT -- so maybe the automatic drop->close is working -- but again I will make a double check later. |
BTW -- does the child automatically disconnect when it goes out of scope? i.e. say I execute commands in a loop and each call execution is performed in a block of its own -- will each child be disconnected after the block ends? |
@CowBoy4mH3LL yes, that's definitely possible! TBH, openssh initially supports only reference, and then we added support of Arc/Rc for certain workflow. |
Yes, the remote will kill it. |
I see a few types (not comprehensive though) of functions defined in the library depending on their input and output
-- those with input: absolute, references, Arc
-- those with output: absolute, references, Arc
Given that, I am facing issues when using reference/Arcs outputted by some functions as arguments of others that take absolutes as inputs. Here is an example
From the above, the compiler does not like
session.clone().close()
becauseclone()
returns anotherArc
andSession
does not implementCopy/Clone
andclose()
takes an absoluteself
as argument.Is this an already discussed case, or am I missing something really obvious :) ?
The text was updated successfully, but these errors were encountered: