diff options
author | Adam Weinberger <adamw@FreeBSD.org> | 2010-11-21 02:48:14 +0000 |
---|---|---|
committer | Adam Weinberger <adamw@FreeBSD.org> | 2010-11-21 02:48:14 +0000 |
commit | 647f205ac57a2a43988bc824da04572748ae5a68 (patch) | |
tree | 170b6c5d21f883c20662b7409f9df9c12b63a9aa /shells/bash-completion/files | |
parent | - Update to 0.1401 (diff) |
This patch hopefully fixes bash freezing on amd64 when using host-based
completions. Tons of thanks to Raphael Kubo da Costa for identifying the
fix and providing us with a patch, and to ehaupt for testing!
PR: ports/150322
Submitted by: Raphael Kubo da Costa <kubito@gmail.com>
Reviewed by: ehaupt
Notes
Notes:
svn path=/head/; revision=264859
Diffstat (limited to 'shells/bash-completion/files')
-rw-r--r-- | shells/bash-completion/files/patch-do_not_hang_on_avahi_daemon | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/shells/bash-completion/files/patch-do_not_hang_on_avahi_daemon b/shells/bash-completion/files/patch-do_not_hang_on_avahi_daemon new file mode 100644 index 000000000000..413fad67b02a --- /dev/null +++ b/shells/bash-completion/files/patch-do_not_hang_on_avahi_daemon @@ -0,0 +1,21 @@ +This patch is related to PR ports/150322. + +When avahi-daemon is not running, bash-completion will hang for some seconds +waiting for response from it because of the call to avahi-browse. + +The patch was originally obtained in bash-completion's bug tracker, and was +written by Ville Skyttä. + +Reference: https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312691&group_id=100114 + +--- bash_completion 2010-06-16 12:44:20.000000000 -0300 ++++ bash_completion 2010-11-18 23:33:53.000000000 -0200 +@@ -1315,7 +1315,7 @@ + # avahi's services DB. We don't need the name of the service, and if it + # contains ";", it may mistify the result. But on Gentoo (at least), + # -k isn't available (even if mentioned in the manpage), so... +- if type avahi-browse >&/dev/null; then ++ if type avahi-browse >&/dev/null && PATH="$PATH:/sbin:/usr/sbin:/usr/local/sbin" avahi-daemon --check &>/dev/null; then + COMPREPLY=( "${COMPREPLY[@]}" $( \ + compgen -P "$prefix$user" -S "$suffix" -W \ + "$( avahi-browse -cpr _workstation._tcp 2>/dev/null | \ |