Skip to Content.
Sympa Menu

sm-sorcery-bugs - [SM-Sorcery-Bugs] [Bug 10576] New: sscripts don't always clean after themselves

sm-sorcery-bugs AT lists.ibiblio.org

Subject: Bugs for Sorcery are reported here

List archive

Chronological Thread  
  • From: bugzilla-daemon AT bugs.sourcemage.org
  • To: sm-sorcery-bugs AT lists.ibiblio.org
  • Subject: [SM-Sorcery-Bugs] [Bug 10576] New: sscripts don't always clean after themselves
  • Date: 26 Feb 2006 18:53:05 -0000

http://bugs.sourcemage.org/show_bug.cgi?id=10576

Summary: sscripts don't always clean after themselves
Product: Sorcery
Version: 1.13.x
Platform: Other
OS/Version: other
Status: NEW
Severity: normal
Priority: P2
Component: Unknown
AssignedTo: sm-sorcery-bugs AT lists.ibiblio.org
ReportedBy: jakakranjc AT email.si


Try interrupting gaze alien .

This is caused by exit statements (script terminates asap, cleanup isn't
called) and similarly "trap exit PIPE".

I added trap gaze_cleanup EXIT, which calls gaze_cleanup when the shell
terminates. Since gaze is the only not root-only script, gaze_cleanup was
added, to avoid erroring in clean_tmp_dir .

testcase for trap bla EXIT (it is indeed only run once):
#!/bin/bash
trap "echo i am all alone at the end of shell life" EXIT
echo | sed -n p | sed -n p | cat
( exit 3 )
( ( ( exit 33 ) ) )
bash -c echo
su -c echo
echo end

however exec overrides it, so cast can't have it globally set. cast had only
one bad exit (in help), but it wasn't trivial to fix, so I just added the
trap
again. The test shows it doesn't get carried to subshells, so it should be
ok.
(rm -rf nothing works quietly aswell)
To reproduce this: cast --invalid-option

One bad exit in cleanse.

dispel, scribe and summon are similar to cast:
dispel -bla
summon -p bla
scribe adasfsdg

Maybe it is enough to add clean_tmp_dir to help for those scripts that exit
there. To me that trap looks more tight though.

--
Configure bugmail: http://bugs.sourcemage.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



  • [SM-Sorcery-Bugs] [Bug 10576] New: sscripts don't always clean after themselves, bugzilla-daemon, 02/26/2006

Archive powered by MHonArc 2.6.24.

Top of Page