delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/03/29/03:47:17

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
Message-ID: <4249160B.9080506@atomice.net>
Date: Tue, 29 Mar 2005 09:47:07 +0100
From: Chris January <chris AT atomice DOT net>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: /proc/self/exename -> exe ? (Re: Retrieving name of executable)
References: <41E811DB DOT 1030800 AT agilent DOT com> <20050114193528 DOT GA8109 AT trixie DOT casa DOT cgf DOT cx> <20050329043605 DOT GA23477 AT griboedov> <20050329083637 DOT GG23860 AT cygbert DOT vinschen DOT de>
In-Reply-To: <20050329083637.GG23860@cygbert.vinschen.de>
X-Antivirus-Scanner: Clean mail though you should still use an Antivirus
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - quill.nothard.net
X-AntiAbuse: Original Domain - cygwin.com
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - atomice.net
X-Source:
X-Source-Args:
X-Source-Dir:
X-IsSubscribed: yes
Note-from-DJ: This may be spam

Corinna Vinschen wrote:
> 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.

Maybe exename should be kept for backwards compatibility?

Chris

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

- Raw text -


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