Skip to content

Instantly share code, notes, and snippets.

@hage
Last active January 23, 2016 14:37
Show Gist options
  • Save hage/1a92c013da1430802de1 to your computer and use it in GitHub Desktop.
Save hage/1a92c013da1430802de1 to your computer and use it in GitHub Desktop.
tmux の unix ドメインソケットが消えた時の対処 ref: http://qiita.com/__hage/items/db024acea35575121b25
% mkdir -m700 /private/var/folders/<中略>/T/tmux-501
% killall -SIGUSR1 tmux
function tmux-remake-socket () {
if [ ! $TMUX ]; then
return
fi
tmux_socket_file=`echo $TMUX|awk -F, '{print $1}'`
if [ ! -S $tmux_socket_file ]; then
mkdir -m700 `dirname $tmux_socket_file` 2> /dev/null
killall -SIGUSR1 tmux
else
echo tmux unix domain socket exists! nothing to do.
fi
unset tmux_socket_file
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment