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 Date: Fri, 10 Sep 2004 21:52:10 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: cygwin 1.5.11: execv doesn't set argv[0] on Windows programs Message-ID: <20040911015210.GC15401@trixie.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i On Fri, Sep 10, 2004 at 02:19:40PM -0500, David A. Rogers wrote: >On Fri, 10 Sep 2004, Chuck McDevitt wrote: > >> argv and argc are concepts from the C runtime, not the Windows OS. >> >> The actual entry point to your program is to a routine that calls the >> initialization routines of the C library, then calls winMain. >> > >Yes, certainly. The point I was making was that the information was available >in a true win32 app. David Korn implied that the WinMain call was the only >access to the calling arguments that were available to a win32 app. That is >not true, as I showed. This is what Dave Korn said: >But it's fair to point out that the argv concept is not part of the OS, >it's part of a compiler support library; You don't seem to be getting the concept that this is not part of the OS. It is an extension imposed by msvcrt.dll. If the application doesn't use msvcrt.dll then there is no guarantee that argv[0] will be set as expected. You can write 100 programs showing that you are seeing argv and argc. That doesn't mean that it is part of the standard Windows API. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/