Re: [Ssh-sftp-perl-users] Using Net::SSH2 as a file handle
Brought to you by:
dbrobins
From: Bryan B. <br...@bu...> - 2006-01-20 20:22:06
|
> > Ah, then there's the problem. Fileno tries to get a real Unix filehandle > out > of the object; since it isn't a real Unix file, you won't get one. > > Maybe something can be worked out with pipes so that it really is a handle > (create a pipe, send the channel data to one end, give expect the other > end) > but it's beyond the scope of the current implementation. > > -- > Dave > Isa. 40:31 Ok, forgive me if my ignorance misses something here. Why not just implement channel as a real filehandle? You would still do everything as is, but only now you could create a shell, then print things directly to and read things directly from it. Which begets the question: What AM I to do with a shell created by $chan->shell() ? Do I have to keep polling this to know when I can write to it? I havnt been able to do much with this other then print out the first couple of lines after it connects. Printing directly to it and/or execing on top of shell doesnt seem to produce any more output then that. An example might be handy, and/or some further documentation. Thanks. Bryan http://sourceforge.net/projects/rover |