mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:27:43 +00:00
pgrep: Return 1 rather than 0 if there are no matches
This matches the behavior of `pgrep` on Linux.
This commit is contained in:
parent
cd08870a64
commit
8706c88370
1 changed files with 2 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Aziz Berkay Yesilyurt <abyesilyurt@gmail.com>
|
||||
* Copyright (c) 2023, Tim Ledbetter <timledbetter@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -65,5 +66,5 @@ ErrorOr<int> serenity_main(Main::Arguments args)
|
|||
if (displayed_at_least_one)
|
||||
outln();
|
||||
|
||||
return 0;
|
||||
return matches.size() > 0 ? 0 : 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue