Hello,
Because I couldn't retrieve the exit reason, I've wrote this little exit function which reveal some kind of bug in "OnExit".
Whatever method used to terminate the script (reload, system shutdown, etc.) it always produce a single value: 0
Code: Select all
OnExit(DoExit)
DoExit(o*) {
for k, v in o
fileappend(k "=" v "`n", "why.txt")
}