Mail Archives: cygwin/2003/04/10/14:57:30
BB,
I applaud the effort. I think it would be terrific to have a cygrunsrv
equivalent on Win9x systems. I don't know how far you've gotten in terms
of design, but here are a few suggestions:
- instead of creating yet another program, we should probably change
cygrunsrv to do something different on Win9x. That way, the READMEs
(and some scripts) will apply
- if you need help hiding that command window, I have code
that's been tested on Win9x (I think the command interpreter on Win9x
is actually "command.com", not "cmd.exe", though)
- utime() is unimplemented for directories at all... I don't know that it
even works on WinNT/2k/XP... Corinna?
Igor
On Thu, 10 Apr 2003, BB wrote:
> I've notice some discussion about problems running cron on Win9x. I'm
> currently running cron and init on Win95. Win98 works too. I'm not running
> anything complex with cron yet though. Unfortunately, I'm stuck in Win9x
> mode, but at least I'm being paid for it.
>
> One thing that is required is the addition of "SYSTEM:*:18:544:,S-1-5-18::"
> to the /etc/passwd file.
> The ",S-1-5-18" part probably isn't required, but I just simply copied the
> entry from an XP machine. I also added "SYSTEM:S-1-5-18:18:" to /etc/group
> but I don't think it matters.
>
> -----------from cron.h----------------
> #ifdef __CYGWIN__
> #define ROOT_UID 18
> #define ROOT_USER "SYSTEM"
> #else
> -------------------------------------
>
> Try adding the SYSTEM user as mentioned above and then run
> /usr/sbin/cron -D. In this case, the window it is running in will remain
> open. If you run it without the -D and then try to exit from the cmd
> window, the window will not close until you kill cron.
>
> I am in the process of writing a cygwin /windows gui app (cygruncmd) modeled
> around the service_main() of cygrunsrv. It will fork and exec a cmd (i.e.
> cron or init) redirecting stdout output the to a log such as
> /var/log/cron.log as cygrunsrvdoes. I also plan to use it to run init on
> Win9x for agetty. It needs to be a windows gui app so I can monitor system
> shutdown and kill the cmd when the system shuts down. An option to the app
> will be to run with the window hidden. Another option might be to respawn
> when the cmd exits. Which gets me to another option I might try, running
> cron from init. Not sure about this one.
>
> A few additional notes:
> 1. cron doesn't seem monitor system clock changes as far as I can tell. So
> if the time is adjusted backwards say from 11:00am - 10:00am, when cron
> wakes up and adds 60 seconds to its previous time of 11:00 to 11:01, it will
> wait an hour before it wakes again. I guess this could be a problem in the
> fall if the change in time is automatic. If manually changing the time,
> restarting cron is the solution as long as the use knows about the problem.
>
> 2. On Win9x, crontab cannot touch the time on "/var/cron/tabs", so cron
> doesn't notice a change. You can get around this my runnning the following
> commands, but you MUST not remove the tabs directory close to the 0 second
> or cron might exit when it wakes up and cannot find tabs. Maybe crontab
> could be enhanced to make sure the directory time is modified on Win9x
> systems. This workaround is fine for me right now. I plan to insert a call
> to a program that waits until 30 seconds after the minute so cron doesnt
> fail between the cp and mv.
> ------------------------------------------
> rm -R -f /var/cron/tabs.sav
> cp -R /var/cron/tabs /var/cron/tabs.sav
> rm -R -f /var/cron/tabs
> mv /var/cron/tabs.sav /var/cron/tabs
> ----------------------------------------
>
> Hope this helps.
> [snip]
> BB
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
Knowledge is an unending adventure at the edge of uncertainty.
-- Leto II
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -