Cygwin: cygwin_GetCommandLineW/A: don't rely on __argv[0] content
commitbded8091c438d18e1d259864d773891a747c7576
authorCorinna Vinschen <corinna@vinschen.de>
Wed, 31 Jan 2024 12:30:05 +0000 (31 13:30 +0100)
committerCorinna Vinschen <corinna@vinschen.de>
Wed, 31 Jan 2024 19:11:58 +0000 (31 20:11 +0100)
tree210791012c8b12db93ab3793e6d66e9b2065e614
parent1ce9756ee61e8dff5e3319851e14ebf310a0bdd8
Cygwin: cygwin_GetCommandLineW/A: don't rely on __argv[0] content

Since it's possible to change the __argv array, we should not rely
on __argv[0] actually representing the windows executable path in
any way.  Use the real path stored in global_progname instead.

Fixes: 521953a83a885 ("* common.din: Export GetCommandLine{A,W}.")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
winsup/cygwin/kernel32.cc