This is the mail archive of the 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]

Re: debugging rshd

Mike Ayers wrote:
>     I'm having trouble with rshd and I'd like to debug the problem.
> Before I go delving into inetd.c, could someone perhaps tell me how to
> start in.rshd under gdb?  I tried setting up inetd.conf as:
> shell   stream   tcp   nowait   root   /usr/bin/gdb
> /usr/local/libexec/in.rshd -L

You will have no luck that way. rshd expects the already opened socket
connection on stdin/stdout/stderr. This is what inetd does for it's
child processes. rshd isn't intended as a stand-alone daemon.

On the other hand: What problems do you encounter? Are you using
the latest version (1.3.2-8)? It contains a fix for rshd which avoids
a possible crash on startup.

>     ...specifically, "<server_path> <args>" appears to get
> "/usr/sbin/in.rshd in.rshd -L", which seems more like "<server_path>
> <server_name> <args>" to me.  

That's the same. `args' begins counting with 0.

> Are we supposed to be handing the
> executable its own name?

You may do this. Some applications work different when they are
started with another argv[0]. `rsh' for example expects to be named
`rsh' (aka argv[0] == "rsh"). Otherwise it treats argv[0] as the
name of the host it should connected to.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer              
Red Hat, Inc.

Want to unsubscribe from this list?
Send a message to

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