delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/04/11/16:43:03

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Injected-Via-Gmane: http://gmane.org/
To: cygwin AT cygwin DOT com
From: "BB" <canofspam AT att DOT net>
Subject: Re: cron on Win9x works
Date: Fri, 11 Apr 2003 15:41:18 -0500
Lines: 53
Message-ID: <b7798c$npp$1@main.gmane.org>
References: <b74d6s$mv7$1 AT main DOT gmane DOT org> <Pine DOT GSO DOT 4 DOT 44 DOT 0304101446040 DOT 8014-100000 AT slinky DOT cs DOT nyu DOT edu> <b7760s$6su$1 AT main DOT gmane DOT org> <20030411201501 DOT GF11137 AT cygbert DOT vinschen DOT de>
Reply-To: "BB" <canofspam AT att DOT net>
X-Complaints-To: usenet AT main DOT gmane DOT org
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

"Corinna Vinschen" <corinna-cygwin AT cygwin DOT com> wrote in message
news:20030411201501 DOT GF11137 AT cygbert DOT vinschen DOT de...
> 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019