Re: cygwin 1.5.11: execv doesn't set argv[0] on Windows programs

2004-09-10 Thread Christopher Faylor
On Fri, Sep 10, 2004 at 12:38:31AM -0400, Igor Pechtchanski wrote: Hi, I'm getting the following behavior consistently: $ bash -c 'exec -a java -h' 21 | egrep 'options?]' Usage: java.exe [-options] class [args...] or java.exe [-jar] [-options] jarfile [args...] $ but $ bash -c 'exec

Re: cygwin 1.5.11: execv doesn't set argv[0] on Windows programs

2004-09-10 Thread Igor Pechtchanski
On Fri, 10 Sep 2004, Christopher Faylor wrote: On Fri, Sep 10, 2004 at 12:38:31AM -0400, Igor Pechtchanski wrote: Hi, I'm getting the following behavior consistently: [snip] In other words, invoking a Cygwin program sets argv[0] correctly, but invoking a Windows program doesn't.

RE: cygwin 1.5.11: execv doesn't set argv[0] on Windows programs

2004-09-10 Thread Dave Korn
-Original Message- From: cygwin-owner On Behalf Of Igor Pechtchanski Sent: 10 September 2004 14:57 On Fri, 10 Sep 2004, Christopher Faylor wrote: There is no such thing as argv[0] for a Windows program. Cygwin uses CreateProcess to create processes. CreateProcess does not

RE: cygwin 1.5.11: execv doesn't set argv[0] on Windows programs

2004-09-10 Thread Igor Pechtchanski
On Fri, 10 Sep 2004, Dave Korn wrote: -Original Message- From: cygwin-owner On Behalf Of Igor Pechtchanski Sent: 10 September 2004 14:57 On Fri, 10 Sep 2004, Christopher Faylor wrote: There is no such thing as argv[0] for a Windows program. Cygwin uses CreateProcess to

RE: cygwin 1.5.11: execv doesn't set argv[0] on Windows programs

2004-09-10 Thread David A. Rogers
On Fri, 10 Sep 2004, Dave Korn wrote: There is no concept of argv in the windows OS itself. The application gets the entire commmand line as one unparsed string. Actually, this is not true. Even in a true win32 app, argc and argv are available, they are just not as obvious. The following

RE: cygwin 1.5.11: execv doesn't set argv[0] on Windows programs

2004-09-10 Thread Chuck McDevitt
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. Those initialization routines get the command line via Win32 call, allocates memory for argv,

RE: cygwin 1.5.11: execv doesn't set argv[0] on Windows programs

2004-09-10 Thread Igor Pechtchanski
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. Those initialization routines get the command

RE: cygwin 1.5.11: execv doesn't set argv[0] on Windows programs

2004-09-10 Thread David A. Rogers
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

Re: cygwin 1.5.11: execv doesn't set argv[0] on Windows programs

2004-09-10 Thread Christopher Faylor
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

Cygwin 1.5.11: execv doesn't set argv[0] on Windows programs

2004-09-09 Thread Igor Pechtchanski
Hi, I'm getting the following behavior consistently: $ bash -c 'exec -a java -h' 21 | egrep 'options?]' Usage: java.exe [-options] class [args...] or java.exe [-jar] [-options] jarfile [args...] $ but $ bash -c 'exec -a bash --help' 21 | egrep 'options?]' Usage: [GNU long