Skip to content

Commit

Permalink
use ps and awk to emulate pgrep
Browse files Browse the repository at this point in the history
There is no pgrep in git for windows, so use ps and awk to emulate it.
  • Loading branch information
spacewander committed Jan 18, 2016
1 parent 1a0cde2 commit 7c638cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/git-changelog
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ _exit() {
stty sane; echo; echo "caught signal, shutting down"

IFS=$'\n'
pid_list=( $(pgrep -P $$) )
pid_list=( $(ps -e -o ppid,pid | awk '/^ '$$'/{print $2}') )
IFS="$defaultIFS"

local _pid
Expand Down

0 comments on commit 7c638cb

Please sign in to comment.