when wine is launched to run an executable file that does not exist,
it does not return a consistent error code according to the file path being absolute or relative:
$ wine zz.exe
0024:err:module:__wine_process_init L"C:\\windows\\system32\\zz.exe" not found
$ echo $?
53
$ wine /zz.exe
wine: cannot find L"/zz.exe"
$ echo $?
0
is this the expected behavior ?
"cannot find" return code with absolute path
Re: "cannot find" return code with absolute path
In the first situation, Wine start and tries to find the file as a built-in, but fails:
In the second case, you specify a nonexistent file and Wine stops successful:
Code: Select all
WINEDEBUG=warn+all wine zz.exe
0009:warn:ntdll:NtQueryAttributesFile L"\\??\\Z:\\home\\user\\zz.exe" not found (c0000034)
0009:warn:ntdll:NtQueryAttributesFile L"\\??\\C:\\windows\\system32\\zz.exe" not found (c0000034)
0009:warn:ntdll:NtQueryAttributesFile L"\\??\\C:\\windows\\system\\zz.exe" not found (c0000034)
0009:warn:ntdll:NtQueryAttributesFile L"\\??\\C:\\windows\\zz.exe" not found (c0000034)
0009:warn:ntdll:NtQueryAttributesFile L"\\??\\C:\\windows\\system32\\zz.exe" not found (c0000034)
0009:warn:ntdll:NtQueryAttributesFile L"\\??\\C:\\windows\\zz.exe" not found (c0000034)
0009:warn:ntdll:NtQueryAttributesFile L"\\??\\C:\\windows\\system32\\wbem\\zz.exe" not found (c0000034)
0009:warn:ntdll:NtQueryAttributesFile L"\\??\\C:\\windows\\system32\\WindowsPowershell\\v1.0\\zz.exe" not found (c0000034)
...
0009:warn:ntdll:FILE_CreateFile L"\\??\\C:\\windows\\system32\\zz.exe" not found (c0000034)
0009:warn:ntdll:FILE_CreateFile L"\\??\\Z:\\usr\\lib\\wine\\..\\i386-linux-gnu\\wine\\zz.exe" not found (c0000034)
0009:warn:module:find_builtin_dll cannot find builtin library for L"zz.exe"
0009:warn:module:load_dll Failed to load module L"C:\\windows\\system32\\zz.exe"; status=c0000135
0009:err:module:__wine_process_init L"C:\\windows\\system32\\zz.exe" not found
Code: Select all
WINEDEBUG=warn+all wine /zz.exe
0009:warn:ntdll:NtQueryAttributesFile L"\\??\\Z:\\zz.exe" not found (c0000034)
wine: cannot find '/zz.exe'