reactos/base/applications/cmdutils
Hermès Bélusca-Maïto 4089e90890
[TASKKILL] Final sync with wine-10.0 (#7855)
[WINESYNC] taskkill: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id fb80c1b554eaf07bf2f89fcf2960e39bd0d4787a by Alexandre Julliard <julliard@winehq.org>

[WINESYNC] taskkill: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 3180972ee2c8e67c425aa7f5279d0cd830455c3d by Michael Stefaniuc <mstefani@winehq.org>

[WINESYNC] taskkill: Use the standard va_list instead of __ms_va_list.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 2c2e75503bea973a3091ea48d431782da656ef8e by Alexandre Julliard <julliard@winehq.org>

[WINESYNC] taskkill: Use OEM code page for output.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 8fdf397505522cc8e41b58cd960899ef7cdf322b by Eric Pouech <eric.pouech@gmail.com>

[WINESYNC] taskkill: Use exit code 1 when terminating processes.
wine commit id fe6294c74346e9956fb839d2a4ca078c624f6bbf by Brendan Shanks <bshanks@codeweavers.com>

[WINESYNC] taskkill: Use CRT allocation functions.
wine commit id dd3f3f381f9e761325c7c06236de1241c9605ed6 by Paul Gofman <pgofman@codeweavers.com>

[WINESYNC] taskkill: Remove unneeded free() before process exit.
wine commit id 20ab5f06d0972440a7df7fb1ba390ab1b32f3b1d by Paul Gofman <pgofman@codeweavers.com>

[WINESYNC] taskkill: Enumerate processes in main().
wine commit id cf4a0b7392f33ba3e0b3fe69007a6d1f327f13f2 by Paul Gofman <pgofman@codeweavers.com>

[WINESYNC] taskkill: Factor out get_task_pid().
wine commit id 62ef3c5be1d2c5374399984588a9daa75663d030 by Paul Gofman <pgofman@codeweavers.com>

[WINESYNC] taskkill: Use toolhelp snapshot to get process information.
wine commit id 6cca1f5099a8354b67578b42dd34fd010e80b6de by Paul Gofman <pgofman@codeweavers.com>

[WINESYNC] taskkill: Mark processes for termination in main().
wine commit id 5c851451892e05c1747108432a5a2bff3a78ed9e by Paul Gofman <pgofman@codeweavers.com>

[WINESYNC] taskkill: Support terminating child processes.
wine commit id fb6b1c91bbf412f5eba260ae52ee38176fd693d4 by Paul Gofman <pgofman@codeweavers.com>

NOTE: This implementation is disabled for ReactOS, and we keep
our own. See the comment block in the code for the reasons why.

+ Adaptations for ReactOS-specific code.

In particular, great care has been taken to keep the `pkill_list`
functionality (read: fix) introduced in PR #2403 (commit 97e7efc020).
The current problem with Wine's code is that if many processes (more
than one) with the same image name are running, then:

   taskkill /im theimagename.exe

would only terminate *one* of the corresponding processes, instead of
all processes having this same image name (as on Windows).
The `pkill_list` array contains all the PIDs of these processes. This
replaces the single `pid` initialized by `get_task_pid`.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2025-04-08 15:36:57 +02:00
..
at [RESOURCES] Remove redundant #pragma code_page(), includes, etc. 2024-12-22 18:39:26 +01:00
attrib [REACTOS] Use standard conforming names 2024-10-20 14:12:25 +03:00
certutil [CERTUTIL] Add -asn verb 2025-03-24 18:00:06 +01:00
chcp [REACTOS] "http://www.reactos" -> "https://reactos" (#5043) 2023-02-06 17:01:52 +03:00
clip [TRANSLATION] Review & update Simplified Chinese (zh-CN) translation (#3933) 2022-03-31 20:30:52 +03:00
comp [TRANSLATION] Update Russian (ru-RU) translation (#5953) 2023-11-15 02:00:36 +03:00
cscript [CMAKE] Introduce set_wine_module (Retry) (#7860) 2025-04-04 20:44:38 +09:00
dbgprint [APPLICATIONS] Fix 64 bit issues 2018-08-04 19:19:34 +02:00
doskey [REACTOS] Use the ISO C and C++ conformant names: _wcsicmp, _stricmp 2024-10-20 14:12:25 +03:00
eventcreate [TRANSLATION] Review & update Simplified Chinese (zh-CN) translation (#3933) 2022-03-31 20:30:52 +03:00
fc [BASE] Update French (fr-FR) translation (#7563) 2025-03-24 21:10:02 +01:00
find [RESOURCES] Remove redundant #pragma code_page(), includes, etc. 2024-12-22 18:39:26 +01:00
fsutil [FSUTIL] Mark some functions as static (only used in this file) 2020-03-26 16:39:16 +01:00
help [RESOURCES] Remove redundant #pragma code_page(), includes, etc. 2024-12-22 18:39:26 +01:00
hostname [REACTOS] Use the ISO C and C++ conformant names: _wcsicmp, _stricmp 2024-10-20 14:12:25 +03:00
label [LABEL] Update Romanian (ro-RO) translation (#6392) 2024-01-21 21:32:41 +01:00
lodctr
mode [MODE] Fix Romanian (ro-RO) translation (#5434) 2023-07-13 19:24:26 +03:00
mofcomp
more [REACTOS] Refresh old URLs (#7632) 2025-01-28 13:36:45 +09:00
reg [CMAKE] Introduce set_wine_module (Retry) (#7860) 2025-04-04 20:44:38 +09:00
replace [REPLACE] Update Japanese (ja-JP) translation 2024-07-09 18:24:16 +03:00
schtasks [SCHTASKS] Sync with Wine Staging 3.3. CORE-14434 2018-03-25 12:53:36 +01:00
sort
taskkill [TASKKILL] Final sync with wine-10.0 (#7855) 2025-04-08 15:36:57 +02:00
tasklist [RESOURCES] Remove redundant #pragma code_page(), includes, etc. 2024-12-22 18:39:26 +01:00
timeout [TRANSLATION] Add/Update Turkish (tr-TR) translations (#4959) 2023-02-15 17:29:52 +01:00
tree [RESOURCES] Remove redundant #pragma code_page(), includes, etc. 2024-12-22 18:39:26 +01:00
where [RESOURCES] Remove redundant #pragma code_page(), includes, etc. 2024-12-22 18:39:26 +01:00
whoami [REACTOS] Use the ISO C and C++ conformant names: _wcsicmp, _stricmp 2024-10-20 14:12:25 +03:00
wmic [CMAKE] Introduce set_wine_module (Retry) (#7860) 2025-04-04 20:44:38 +09:00
wscript [CMAKE] Introduce set_wine_module (Retry) (#7860) 2025-04-04 20:44:38 +09:00
xcopy [CMAKE] Introduce set_wine_module (Retry) (#7860) 2025-04-04 20:44:38 +09:00
CMakeLists.txt [CMD][CMDUTILS][REPLACE] Make 'replace' command external (#7097) 2024-07-09 04:30:43 +09:00