This is the mail archive of the
mailing list for the Cygwin project.
RE: Best way to run SSHD, cron, etc, on Win9x?
- From: ARM Instrument Mentor <Mentor at arm dot gov>
- To: cygwin at cygwin dot com
- Date: Thu, 14 Feb 2002 17:41:45 -0800
- Subject: RE: Best way to run SSHD, cron, etc, on Win9x?
> I run some Cygwin daemons on Win98 boxes. The way I do it is to put
> following shortcut in the Windows Startup folder:
> c:\cygwin\bin\bash.exe --rcfile /usr/local/bin/startup.sh -i
> Then in startup.sh, I have:
> /usr/bin/rsync --daemon
... snip ...
> I imagine there must be a better way. Anyone have any suggestions?
I've struggled with that too. I'm not sure why, but rxvt seems to help.
Try this in a shortcut: "start /m rxvt -e bash
It isn't strictly necessary to use bash above. For example, you can
"start /m rxvt -e c:\cygwin\usr\local\bin\startup.sh"
but then you have the unfortunate mixture of unix an Windows slashes.
This looks a bit cleaner than the approach you indicated since it
the minimized DOS prompt, but it doesn't get you away from having to
manually close the process at shutdown. I found a little utility called
"shutdown.exe" (of all things!) that is supposed to force background
like that to terminate without complaint. It's a nice idea, but it
doesn't always work properly.
Anyway, you can grab it from here if you want to evaluate it:
I have some other problems with cron on Win9x. I've read and tried
to Craig Rees. I am getting marginal success. CRON starts and will
crontabs stored under /var/cron/tabs if they are named after users found
in passwd. So far so good.
However, once cron is running, it doesn't seem to detect changes to
those crontabs as it is supposed to. At least my understanding through
man pages on cron and crontab is that cron is supposed to monitor the
cron/tabs spool directory for changes to the modification time. Well, I
used crontab to update my user-specific crontab (and it did place the
updated file in the /var/cron/tabs directory) but the mod time of the
directory didn't change, and maybe that's why cron ignores the update?
I always have to kill the cron process and restart it. I tried using
touch -m on the /var/cron/tabs directory but it didn't seem to have any
effect. Finally, I tried deleting the /var/cron/tabs directory and
recreating it while cron was running to see if the new creation time
would trigger cron to read it. This actually worked. So this leads me
to wonder if crontabs is not doing its job correctly? Maybe it isn't
successfully touching the mod time of the cron/tabs directory? In fact,
short of creating and deleting the directory I wasn't able to change the
creation or modification either. Is this a known property of
directories in general?
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html