[Bug 49593] New: inconsistent return code when executable is not found
https://bugs.winehq.org/show_bug.cgi?id=49593 Bug ID: 49593 Summary: inconsistent return code when executable is not found Product: Wine Version: 5.13 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: xantares09(a)hotmail.com Distribution: --- When wine is launched to run an inexistent executable file, the exit code is different according to the path name being passed as absolute or relative: - relative, return code 53: $ wine zz.exe 0024:err:module:__wine_process_init L"C:\\windows\\system32\\zz.exe" not found $ echo $? 53 - absolute, return code 0: $ wine /tmp/zz.exe wine: cannot find L"/tmp/zz.exe" $ echo $? 0 I expected the return code to be also 53 when the file is passed as absolute -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=49593 xantares <xantares09(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Hardware|x86 |x86-64 --- Comment #1 from xantares <xantares09(a)hotmail.com> --- or at least non null -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=49593 xantares <xantares09(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Distribution|--- |ArchLinux -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=49593 xantares <xantares09(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |ntdll -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=49593 --- Comment #2 from xantares <xantares09(a)hotmail.com> --- I think it could come from dlls/ntdll/env.c: static void get_image_path( const char *argv0, UNICODE_STRING *path ) ... /* check for builtin path inside system directory */ if (!is_path_prefix( system_dir, full_name, file_part )) { if (!is_win64 && !is_wow64) goto failed; if (!is_path_prefix( syswow64_dir, full_name, file_part )) goto failed; } ... failed: MESSAGE( "wine: cannot find '%s'\n", argv0 ); RtlExitUserProcess( GetLastError() ); here it seems no error was set and GetLastError may return 0 a proposal would be to return CTL_E_FILENOTFOUND -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=49593 --- Comment #3 from xantares <xantares09(a)hotmail.com> --- Created attachment 67770 --> https://bugs.winehq.org/attachment.cgi?id=67770 proposal patch (untested) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=49593 xantares <xantares09(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julliard(a)winehq.org -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=49593 --- Comment #4 from xantares <xantares09(a)hotmail.com> --- cc @ajulliard as he seems the author of that function: https://github.com/wine-mirror/wine/blame/master/dlls/ntdll/env.c -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=49593 xantares <xantares09(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |minor -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=49593 Gijs Vermeulen <gijsvrm(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Fixed by SHA1| |f8d42a31c624f28f6c9bfd9678f | |b025bf15e9c12 Status|UNCONFIRMED |RESOLVED --- Comment #5 from Gijs Vermeulen <gijsvrm(a)gmail.com> --- This works with wine-5.14. Fixed by: <https://source.winehq.org/git/wine.git/commit/f8d42a31c624f28f6c9bfd9678fb025bf15e9c12> -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=49593 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #6 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 5.15. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla