dot

packages and services management
Log | Files | Refs | README

commit 832e2307f826d698188c5b6a5c0c61f120e0b75e
parent f33771ba10412fc237910b7e22826399322d3df0
Author: Josuah Demangeon <mail@josuah.net>
Date:   Fri, 30 Mar 2018 16:44:48 +0200

one less process by making the shell exec

Diffstat:
Mbin/lstree | 2+-
Mbin/pstree | 4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/lstree b/bin/lstree @@ -49,7 +49,7 @@ BEGIN { function list(entries, path) { - cmd = "cd '" path "' && find ." \ + cmd = "cd '" path "' && exec find ." \ " -name '*.git' -prune -o" \ " -name 'CVS' -prune -o" \ " -exec ls -ld {} +"; diff --git a/bin/pstree b/bin/pstree @@ -46,9 +46,9 @@ BEGIN { function list(entries) { opt = "-o ppid,user,tty,nice,pid,stat,comm" - cmd = "ps -ax " opt " 2>/dev/null"; + cmd = "exec ps -ax " opt " 2>/dev/null"; if (!(cmd | getline)) { - cmd = "ps " opt + cmd = "exec ps " opt cmd | getline; } sub(" *[^ ]+", "");