This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: inetutils (rexecd) patch

[Get raw message]
----- Original Message -----
From: "Corinna Vinschen" <vinschen@redhat.com>
To: "Sergey Okhapkin" <sos@prospect.com.ru>
Sent: Sunday, November 25, 2001 3:31 PM
Subject: Re: inetutils (rexecd) patch


> Thanks for the patch but... you won't believe it, I've already
> patched rexecd the way you did (well, similar).  The reason I
> haven't released it so far is the annoying message I'm getting
> on whatever platform I'm trying to connect to the Cygwin rexecd:
>

Corinna, you can release it, it's not rexecd' problem:-)

>   $ rexec WindowsBox echo hello
>   Username at WindowsBox: corinna
>   Password: ....
>   hello
>   rexec: Error in read from remote host: Connection reset by peer
>
> I really don't understand what's going on there.  The command works
> perfectly but when it's finished, this `Connection reset by peer'
> message is produced.  The rexecd works the same way as rshd but rshd
> doesn't have that problem.  And even when backporting from the latest
> rexecd version I'm still getting this message.
>
> Do you have any idea what's going on there, perhaps?
>

I've found the problem. Winsock needs shutdown() to be called on application
exit to close the connection gracefully, existing game with SO_LINGER in
fhandler_socket::close() do not work properly (looks like winsock does a
hard reset on application exit). I did a fix in my local cygwin sources,
rexecd works much better now:

E:\...src\i686-pc-cygwin\winsup\cygwin>rexec localhost echo hello
Name (sos:sos):
Password (sos:sos):
hello

E:\...src\i686-pc-cygwin\winsup\cygwin>

I need some time to make a cleanup in my changes and to test the fix, I'll
post a diff after that. BTW remind me please - which mailing list should I
post the diff to?

Sergey Okhapkin
Somerset, NJ



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]