Is it possible to know within an END block, if the program died? In Perl I would do this
END {
if ( $? == 255 ) {
# ...
}
}
Is it possible to know within an END block, if the program died? In Perl I would do this
END {
if ( $? == 255 ) {
# ...
}
}
Good question!
There's none that I know of. That is why I created a Pull Request to make the following possible:
END {
unless $*DIED-NATURALLY {
# do special cleanup actions
}
}