Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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" Subject: Re: cron on Win9x works Date: Fri, 11 Apr 2003 15:41:18 -0500 Lines: 53 Message-ID: References: <20030411201501 DOT GF11137 AT cygbert DOT vinschen DOT de> Reply-To: "BB" 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" 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/