DocScrutinizer05 | then OTOH I vaguely recall that without camera getting started at least once since boot, the videa had abysmal (or no) white balance done | 00:00 |
---|---|---|
DocScrutinizer05 | also on N900 the gstreamer process doesn't get killed on teardown of connection - gotta come up with some smart(er) job management | 00:16 |
sicelo | thanks for the explanation. | 00:21 |
DocScrutinizer05 | yw :-) thanks for your interest | 00:36 |
sicelo | ;) | 00:37 |
DocScrutinizer05 | did I share that nice deep-insight "[bash] how to handle signals" stuff? | 00:54 |
DocScrutinizer05 | bottom line: when your script catches a signal that would normally make it abort, you MUST make the script terminate itself by sending that very signal to $self, to let outer shell wrappers know whether to continue or to abort | 00:56 |
DocScrutinizer05 | I.E do NOT use a simple `exit` | 00:57 |
DocScrutinizer05 | How the shell handles ^C (SIGINT) and why: http://www.cons.org/cracauer/sigint.html | 01:23 |
DocScrutinizer05 | TL;DR: trap 'rm -f $TMP ; trap 2 ; kill -2 $$' 1 2 3 13 15 | 01:24 |
luke-jr | DocScrutinizer05: if only the boolean result matters, exit 1 works; if you need the exact correct result, then sending signal 2 won't be right for any of the other signals | 09:04 |
DocScrutinizer05 | no, the return code does NOT matter, see the article I linked | 17:25 |
DocScrutinizer05 | you may go fancy and set up a separate interrupt handler (trap) for every signal you catch, end send that very signal to $$ (self) after you did clanup | 17:27 |
DocScrutinizer05 | usually this is not necessary though | 17:27 |
* DocScrutinizer05 idly wonders if there is, or bash could learn to provide, a $SIGNAL env that contains an array of numeric IDs of signals the process received | 17:30 | |
brolin_empey | DocScrutinizer05: Somewhat like ${PIPESTATUS} in bash? | 17:41 |
DocScrutinizer05 | sort of | 17:46 |
DocScrutinizer05 | of course you can do trap 'cleanup INT' INT; trap 'cleanup ABRT' ABRT; ... | 17:47 |
DocScrutinizer05 | and have cleanup() deal with the signame parameter | 17:48 |
DocScrutinizer05 | or for (i=1; i<=32; i++); do trap "cleanup $i" -$i; done; #? | 17:52 |
DocScrutinizer05 | I'm not sure what the latter will do | 18:02 |
DocScrutinizer05 | not even allowed according to POSIX which only allows names for signal/condition, no integers | 18:03 |
Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!