On Fri, Feb 16, 2001 at 09:10:29AM -0500, Pierre Abbat wrote:
> On Fri, 16 Feb 2001, John Poltorak wrote:
> >I am trying to set up an RSYNC server, and looking at the man pages
> >it looks like a trivial enough task...
> >
> >It seems as though I need to create a /etc/rsyncd.conf with something
> >like this in it:-
> >
> >
> >[ftp]
> > path = /pub
> > comment = ftp export area
> >
> >
> >Then all I need to do is run:-
> >
> >rsync --daemon
> >
> >
> >Is there more to it? There must be, because this doesn't work.
> >
> >When I run rsync like this, it immediately returns to the command
> >prompt. No error msgs appear. Is there a debug mode which I can use to
> >to make sure it is at least picking up the cfg file correctly?
>
> If you then do "ps ax|grep rsync" (that's Unix; I have no idea the OS/2
> equivalent), you should see that it is running. When it's a daemon started from
> the command line, it forks, the parent returns immediately, and the client
> detaches from the terminal and becomes a daemon.
On OS/2 there is a PSTAT command as well a number of other third-party
apps which mimic ps. Using one of these shows no sign of RSYNC.
I guess 'netstat -s' would also provide some evidence of its presence
if port 873 was in use but it isn't.
> If you now type "rsync localhost::", it should reply "ftp". Without the daemon
> running in the background, you will get an error (unless you have something
> else that responds to port 873, such as an rsync entry in /etc/inetd.conf).
It looks to me like the daemon mode is not working on OS/2...
What would happen if I took the 'exit' out of the following code from
socket.c ?
/****************************************************************************
become a daemon, discarding the controlling terminal
****************************************************************************/
void become_daemon(void)
{
int i;
if (fork()) {
_exit(0);
}
> phma
--
John