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, 17 Sep 2004 17:00:39 -0500 From: Brian Ford Reply-To: cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com Subject: argv[0] drops extension? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes $ uname -a CYGWIN_NT-5.1 fordpc 1.5.12(0.116/4/2) 2004-09-16 11:17 i686 unknown unknown Cygwin $ cat argv.c #include #include #include #include int main(int argc, char *argv[]) { printf("argv[0]: %s\n", argv[0]); if (open(argv[0], O_RDONLY|O_BINARY) < 0) perror("open"); return 0; } $ gcc -o argv.exe -g -O2 argv.c $ ./argv argv[0]: ./argv open: No such file or directory $ ./argv.exe argv[0]: ./argv open: No such file or directory Is this expected behavior? Thanks. -- Brian Ford Senior Realtime Software Engineer VITAL - Visual Simulation Systems FlightSafety International the best safety device in any aircraft is a well-trained pilot... -- 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/