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: Tue, 29 Mar 2005 10:36:37 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: /proc/self/exename -> exe ? (Re: Retrieving name of executable) Message-ID: <20050329083637.GG23860@cygbert.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <41E811DB DOT 1030800 AT agilent DOT com> <20050114193528 DOT GA8109 AT trixie DOT casa DOT cgf DOT cx> <20050329043605 DOT GA23477 AT griboedov> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050329043605.GA23477@griboedov> User-Agent: Mutt/1.4.2i On Mar 28 23:36, Anthony Heading wrote: > On Fri, Jan 14, 2005 at 02:35:28PM -0500, Christopher Faylor wrote: > > On Fri, Jan 14, 2005 at 10:39:23AM -0800, Earl Chew wrote: > > >I think the name of the current executable is stored in myself->progname > > >within cygwin1.dll. > > > > > >The more easily accessible __progname returns the basename of the > > >executable. > > > > > >Is there a way for an application to obtain myself->program, other > > >than resorting to raw win32 call to GetModuleFileName()? > > > > argv[0] or __argv[0] or /proc/self/exename > > Has this link been renamed? It appears to have changed to > /proc/self/exe now, which has broken a lot of my programs... The old exename was a file containing the path, the new exe is a symlink pointing to the binary. This is how it's done on Linux. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- 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/