1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 04:14:58 +00:00
Commit graph

15 commits

Author SHA1 Message Date
Shannon Booth
e2e7c4d574 Everywhere: Use to_number<T> instead of to_{int,uint,float,double}
In a bunch of cases, this actually ends up simplifying the code as
to_number will handle something such as:

```
Optional<I> opt;
if constexpr (IsSigned<I>)
    opt = view.to_int<I>();
else
    opt = view.to_uint<I>();
```

For us.

The main goal here however is to have a single generic number conversion
API between all of the String classes.
2023-12-23 20:41:07 +01:00
Tim Ledbetter
17fe2c4822 pkill: Add -O option to filter processes by age
This option allows the user to specify a number of seconds. Only
processes older than the given number of seconds are killed.
2023-06-16 07:22:45 +02:00
Tim Ledbetter
aa79a4ed9a pkill: Add -o option to kill the oldest matching process only 2023-06-16 07:22:45 +02:00
Tim Ledbetter
519893d31f pkill: Add -n option to kill the newest matching process only 2023-06-16 07:22:45 +02:00
Tim Ledbetter
0621a83cb4 pkill: Allow signal names to be used with the -s option 2023-06-16 07:22:45 +02:00
Tim Ledbetter
0d71db6721 pkill: Initialize display_number_of_matches to false
This ensures the number of matches is not displayed when the `-c`
option is not specified.
2023-06-16 07:22:45 +02:00
Tim Ledbetter
1e21e95a1b pkill: Add --ignore-case as an alias for the -i option 2023-06-10 07:35:52 +02:00
Tim Ledbetter
69b6c6f62c pkill: Add -x option to only select exact matches 2023-06-10 07:35:52 +02:00
Tim Ledbetter
a253be6abf pkill: Add -U option to filter matches by UID or login name 2023-06-10 07:35:52 +02:00
Tim Ledbetter
caa7edff92 pkill: Add -c option to print the number of matches 2023-06-10 07:35:52 +02:00
Tim Ledbetter
6753cf8b20 pkill: Print errors when killing a process to stderr 2023-06-10 07:35:52 +02:00
Ali Mohammad Pur
500044906d LibCore+Everywhere: Remove ArgsParser::add*(char const*&)
This is not guaranteed to always work correctly as ArgsParser deals in
StringViews and might have a non-properly-null-terminated string as a
value. As a bonus, using StringView (and DeprecatedString where
necessary) leads to nicer looking code too :^)
2023-03-01 10:47:19 +01:00
Tim Schumacher
8940f2da7f LibCore: Use Core::Stream for ProcessStatisticsReader 2022-12-10 11:49:24 +00:00
Liav A
9d1ba0e6ad Utilities: Use new global variables at /sys/kernel/ directory 2022-10-25 15:33:34 -06:00
Maxwell Trussell
f5e68fcc20 Utilities: Add pkill 2022-10-13 11:15:33 +02:00