From aba13271f705f5044525860d8f3974221fd73913 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Thu, 25 Jun 2020 19:07:49 -0400 Subject: session: Don't end on signal; don't run cb on end Let the caller do all of this. --- (limited to 'src') diff --git a/src/session.sh b/src/session.sh index c4a9b08..40b00e7 100644 --- a/src/session.sh +++ b/src/session.sh @@ -23,7 +23,6 @@ session_root= session_arch= session_plat= session_mountdir= -session_atexit= session_sigs= _session_es= @@ -67,15 +66,8 @@ _session_umount() session_end() { - if [ ! -d "${session_root}/prokit/sessions/${session_id}" ]; then - # Session already ended by signal. No need for further cleanup. - return 0 - fi - trap : ${session_sigs} - ${session_atexit} - # Unregister the session. profile_bind_umount "${session_arch}" "${session_plat}" \ "${session_mountdir}" \ @@ -110,8 +102,6 @@ _session_handle_sig() local sig="${1}" shift 1 - session_end - _session_es=$((128 + ${sig})) } @@ -151,7 +141,6 @@ session_begin() session_arch="$(cat -- "${root}/etc/proteanos_arch")" session_plat="$(cat -- "${root}/etc/proteanos_plat")" session_mountdir="${mountdir}" - session_atexit="${atexit}" [ -d "${session_root}/prokit" ] || mkdir -- "${session_root}/prokit" if [ -f "${session_root}/prokit/installing" ] && ! ${installing}; then -- cgit v0.9.1