From 90ebadae7fa7843ed4a43c03e344d0e8cdebc936 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 21 Aug 2010 12:07:34 -0400 Subject: Prefer sockets to fifos --- examples/data/scripts/session.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'examples/data/scripts/session.sh') diff --git a/examples/data/scripts/session.sh b/examples/data/scripts/session.sh index 64d8c6b..89eeb7a 100755 --- a/examples/data/scripts/session.sh +++ b/examples/data/scripts/session.sh @@ -19,7 +19,7 @@ UZBL="uzbl-browser -c $UZBL_CONFIG_FILE" # add custom flags and whatever here. act="$1" # Test if we were run alone or from uzbl -if [ -z "$UZBL_FIFO" ]; then +if [ -z "$UZBL_SOCKET" ]; then # Take the old config act="$UZBL_CONFIG" fi @@ -39,24 +39,24 @@ case $act in ;; "endinstance" ) - if [ -z "$UZBL_FIFO" ]; then + if [ -z "$UZBL_SOCKET" ]; then echo "session manager: endinstance must be called from uzbl" exit 1 fi if [ ! "$UZBL_URL" = "(null)" ]; then echo "$UZBL_URL" >> $UZBL_SESSION_FILE fi - echo "exit" > $UZBL_FIFO + echo "exit" | socat - unix-connect:$UZBL_SOCKET ;; "endsession" ) mv "$UZBL_SESSION_FILE" "$UZBL_SESSION_FILE~" - for fifo in $UZBL_FIFO_DIR/uzbl_fifo_*; do - if [ "$fifo" != "$UZBL_FIFO" ]; then - echo "spawn $scriptfile endinstance" > $fifo + for sock in $UZBL_SOCKET_DIR/uzbl_fifo_*; do + if [ "$sock" != "$UZBL_SOCKET" ]; then + echo "spawn $scriptfile endinstance" | socat - unix-connect:$socket fi done - echo "spawn $scriptfile endinstance" > $UZBL_FIFO + echo "spawn $scriptfile endinstance" | socat - unix-connect:$UZBL_SOCKET ;; * ) -- cgit v1.2.3