processes bug fix
This commit is contained in:
@@ -118,8 +118,8 @@ A bar-style prompt showing current time, execution time of the last command
|
||||
| `help` | help | Display the list of available functions and basic usage; `help <command>` delegates to `<command> --help` for shell functions (profile commands) only; honours `NO_COLOR` |
|
||||
| `isipv4` | net | Tell if the given parameter is a valid IPv4 address |
|
||||
| `isipv6` | net | Tell if the given parameter is a valid IPv6 address |
|
||||
| `kt` | processes | Kill a process and all its children (kill tree); `-n`/`--dry-run`, `-s`/`--signal` |
|
||||
| `ku` | processes | Kill all processes owned by the given user name or ID |
|
||||
| `kt` | processes | Kill a process and all its descendants, deepest first (kill tree); `-n`/`--dry-run`, `-s`/`--signal` or a kill-style `-9`/`-KILL`; refuses PID 0, 1 and the current shell; needs `pgrep` |
|
||||
| `ku` | processes | Kill all processes owned by the given user name or ID; `-n`/`--dry-run`, `-s`/`--signal` or a kill-style `-9`/`-KILL`; all users are checked before anything is killed; never kills root's or the current user's processes (except with `-n`) |
|
||||
| `matrix` | rain | Console screensaver with Matrix-style digital rain (binary, kana, ascii charset) |
|
||||
| `mcd` | filefct | Create a directory and immediately move into it |
|
||||
| `mdcat` | disp | Render Markdown files (or stdin) in terminal with colors, inline formatting, tables and framed code blocks; honours `NO_COLOR` |
|
||||
@@ -132,7 +132,7 @@ A bar-style prompt showing current time, execution time of the last command
|
||||
| `pkgr` | packages | Uninstall packages; `-p`/`--purge` also deletes configuration files (apt, pacman, apk; other managers just remove), `-d`/`--deps` also removes dependencies no longer needed (`--auto-remove`, `-Rs`, `--clean-deps`, `depclean`, ... — apk always does, dnf/yum are told not to unless `-d`); `-y`, `-n` as `pkgi` |
|
||||
| `pkgs` | packages | Search for a pattern in installed package names (distro-aware via `get_pkgmgr`) |
|
||||
| `ppg` | processes | Look for the given pattern in running processes |
|
||||
| `ppn` | processes | List processes matching an exact command name |
|
||||
| `ppn` | processes | List processes whose command name (as shown by `ps -o comm`) is exactly the given one |
|
||||
| `ppu` | processes | List processes owned by a specific user |
|
||||
| `profile_upgrade` | updates | Upgrade profile to the latest version (git pull or archive) |
|
||||
| `pwdscore` | pwd | Calculate the strength score of a given password |
|
||||
@@ -321,7 +321,7 @@ change the default without having to pass flags every time.
|
||||
|
||||
| Key | Default | Description |
|
||||
| --- | --- | --- |
|
||||
| `PPU_DEFAULT_FORMAT` | `pid,user,comm,args` | `ps` output format used by `ppu` |
|
||||
| `PPU_DEFAULT_FORMAT` | `pid,user,%cpu,%mem,start,time,command` | `ps` output format used by `ppu` |
|
||||
| `KU_DEFAULT_SIGNAL` | `TERM` | Default signal sent by `ku` |
|
||||
|
||||
**`[updates]`**
|
||||
@@ -478,7 +478,7 @@ to load profile or use its core functions.
|
||||
| `numfmt` | `coreutils` ≥ 8.21 | all | `file_stats --min/--max` | Error message, function returns 1 |
|
||||
| `envsubst` | `gettext` | all | config loading | `$VAR` references in `profile.conf` values left literal |
|
||||
| `killall` | `psmisc` | all | `ku` | Falls back to `pkill` (procps); error if both absent |
|
||||
| `pkill` / `pgrep` | `procps` / `procps-ng` | all | `ku`, `ppg`, `gpid` | `ku` falls back to `killall`; `ppg`/`gpid` fall back to `ps + awk` |
|
||||
| `pkill` / `pgrep` | `procps` / `procps-ng` | all | `ku`, `ppg`, `gpid` | `ku` falls back to `killall`; `ppg`/`gpid` fall back to `ps + awk`; `kt` requires `pgrep` |
|
||||
| `pigz` | `pigz` | all | `taz` (gzip) | Falls back to `gzip` (slower, single-thread) |
|
||||
| `plzip` | `plzip` | all | `taz` (lzip) | Falls back to `lzip` |
|
||||
| `lzip` / `plzip` | `lzip` | all | `taz`/`utaz` (.lz) | Error message if neither is available |
|
||||
|
||||
@@ -111,6 +111,14 @@ Versions follow `MAJOR.MINOR.PATCH-REVISION_STAGE_N` (e.g. `3.99.1-4_rc_1`).
|
||||
leaked a variable.
|
||||
- `packages.sh`: `pkgf ls` now looks the command up in the `PATH`; `pkgs`
|
||||
accepts patterns starting with `-`; `suse` is recognised in `ID_LIKE`.
|
||||
- `processes.sh`: `ku -9 user` / `kt -KILL pid` were rejected by option parsing
|
||||
although documented (kill-style signals are now extracted before `getopt`);
|
||||
`ku` accepts numeric user IDs (killall only takes names), checks all users
|
||||
before killing, returns a failure status when a kill fails, and refuses
|
||||
root and the current user; `kt` no longer re-parses its options for each
|
||||
child, validates the PID and refuses the current shell; `ppn` matched PIDs
|
||||
and names such as `kde-bash` (now exact); `ppg`/`gpid` fallbacks no longer
|
||||
match their own `awk`; `PPU_DEFAULT_FORMAT` documented with its real value.
|
||||
- `compress.sh`: option flags and loop variables no longer leak into the
|
||||
interactive shell.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user