This is the mail archive of the cygwin@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: cron on Win9x works


"Corinna Vinschen" <corinna-cygwin at cygwin dot com> wrote in message
news:20030411201501 dot GF11137 at cygbert dot vinschen dot de dot  dot  dot 
> On Fri, Apr 11, 2003 at 02:46:06PM -0500, BB wrote:
> > --------------------
> > cygrunsrv on Win9x:
> > [...]
> > After a quick analysis, I think cygrunsrv could be modified.   If I
modify
> > cygrunsrv, I think I would need to change it to use WinMain() so it's a
>
> Don't do this.  Avoid it as long as possible.  Try to find another way.
> sshd doesn't need this so why should cygrunsrv?  Especially I'm not sure
> if such a process still runs as NT service application.  This is the
> main task, after all.
> [...]

Corinna

Do you mean don't change it to use WinMain()? or don't do any of it. Not
sure?

According to this link...
http://www.microsoft.com/msj/defaultframe.asp?page=/msj/1097/winnt.htm&nav=/
msj/1097/newnav.htm
"Since you shouldn't have a user interface, it doesn't matter whether you
choose
to implement your service as a GUI application (with WinMain as its entry
point)
or as a console application  (with main as its entry point). "

On Win9x, cygrunsrv would not really be a true service, so the above
statement
wouldnt really apply and it could create a hidden window.  On NT/2K/XP, it
would have no need for the window, so it wouldnt create it, satisfying the
"shouldn't
have a user interface" part..  It would simply use WinMain as an entry
point.

In the past, I have written services that have user interfaces if not
executed by the
service manager.  They had a WinMain().  They could be used either way, as a
normal app or as a service.  But, I'm not sure how different the startup
code is
for the two under Cygwin.

I would rather not use WinMain (less changes), but then I need to figure out
how to run cygrunsrv from a Win9x RunServices entry without it creating a
window.  And most importantly shutting it down at shutdown.  I'll take a
look at the sshd implementation.

BB




--
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/


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