summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/session.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/session.sh b/src/session.sh
index b843e19..83198f6 100644
--- a/src/session.sh
+++ b/src/session.sh
@@ -26,7 +26,7 @@ session_mountdir=
session_atexit=
session_sigs=
-session_mount()
+_session_mount()
{
local fs=
local dir=
@@ -42,7 +42,7 @@ session_mount()
EOF
}
-session_umount()
+_session_umount()
{
local fs=
local dir=
@@ -89,7 +89,7 @@ session_end()
# Clear the sessions pool. If there are no more sessions, unmount the
# file systems.
if rmdir -- "${session_root}/prokit/sessions" 2>/dev/null; then
- session_umount
+ _session_umount
fi
mutex_unlock "${session_root}/prokit/sessions.lock"
@@ -99,7 +99,7 @@ session_end()
return 0
}
-session_handle_sig()
+_session_handle_sig()
{
local sig="${1}"
shift 1
@@ -109,7 +109,7 @@ session_handle_sig()
exit $((128 + ${sig}))
}
-session_set_sigs()
+_session_set_sigs()
{
local i=
local sig=
@@ -125,7 +125,7 @@ session_set_sigs()
case "${sig}" in
'HUP' | 'INT' | 'QUIT' | 'ABRT' | 'ALRM' | 'TERM')
session_sigs="${session_sigs} ${i}"
- trap "session_handle_sig ${i}" ${i}
+ trap "_session_handle_sig ${i}" ${i}
;;
esac
done
@@ -153,7 +153,7 @@ session_begin()
return 1
fi
- session_set_sigs
+ _session_set_sigs
if ! mutex_timedlock "${session_root}/prokit/sessions.lock" 5; then
error "$(get_msg 'cant_lock_sessions')"
@@ -169,13 +169,13 @@ session_begin()
# mounted, clean up the old sessions and mount the file
# systems.
rmdir -- "${session_root}/prokit/sessions/"*
- session_mount
+ _session_mount
fi
else
# If the sessions pool doesn't exist, create it and mount the
# file systems.
mkdir -- "${session_root}/prokit/sessions"
- session_mount
+ _session_mount
fi
# Register the session.