Last active
January 23, 2016 14:37
-
-
Save hage/1a92c013da1430802de1 to your computer and use it in GitHub Desktop.
tmux の unix ドメインソケットが消えた時の対処 ref: http://qiita.com/__hage/items/db024acea35575121b25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% mkdir -m700 /private/var/folders/<中略>/T/tmux-501 | |
% killall -SIGUSR1 tmux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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