Eric Evans
2004-Apr-27 20:34 UTC
[Logcheck-devel] #207795: logcheck: fails to clean up when interrupted
Hi all, I applied the patch attached to bug #207795 to CVS yesterday, and then some hours later it dawned on me that the trap builtin might not be present in all shells, (and sure enough it isn't). Does anyone know of a more portable way to handle signals in a shell script? -- Eric Evans eevans at sym-link.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://lists.alioth.debian.org/pipermail/logcheck-devel/attachments/20040427/a03a0c17/attachment.pgp
Gerfried Fuchs
2004-Apr-28 10:27 UTC
[Logcheck-devel] #207795: logcheck: fails to clean up when interrupted
* Eric Evans <eevans at sym-link.com> [2004-04-27 15:34]:> Subject: [Logcheck-devel] #207795: logcheck: fails to clean up when interrupted^^^^^^^^^^^^^^^^ Can we get rid of that, please? I don't think that we really need it, it just bloats the subject and moves the relevant data off the screen. :-/ I am confident that all of us do sort lists out based on X-List* headers.> I applied the patch attached to bug #207795 to CVS yesterday, and then > some hours later it dawned on me that the trap builtin might not be > present in all shells, (and sure enough it isn't).Package: bash Essential: yes Priority: required Section: base I think it is that bad to make it bash only. Although it would of course be helpful to make it shell-independent, I don't think that it is a real problem when it is too hard to do.> Does anyone know of a more portable way to handle signals in a shell > script?Me not, sorry. I even thought about suggesting using perl, but that wouldn't buy us anything, bash is there already. So long, Alfie -- <etbe> When will we be able to upload packages to Debian again? <weasel> after sarge released. this is a kind of a sneak freeze :) -- during the restore of the debian servers -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://lists.alioth.debian.org/pipermail/logcheck-devel/attachments/20040428/5120ba52/attachment.pgp
Todd Troxell
2004-Apr-28 14:25 UTC
[Logcheck-devel] #207795: logcheck: fails to clean up when interrupted
I don't like the dependence on bash either, but I think it's more important to have the patch in at this point. I don't know of a way to an onexit trap for other shells. There is onintr for csh, but it's not the same. Hmm. A perl/python rewrite would be nice too, but right now, I think it's more important to get these bugs squashed. -Todd On Tue, Apr 27, 2004 at 03:34:45PM -0500, Eric Evans wrote:> I applied the patch attached to bug #207795 to CVS yesterday, and then > some hours later it dawned on me that the trap builtin might not be > present in all shells, (and sure enough it isn't). > > Does anyone know of a more portable way to handle signals in a shell > script? > > -- > Eric Evans > eevans at sym-link.com-- [ Todd J. Troxell ,''`. PSU Student, Debian GNU/Linux Developer, 100% Geek : :' : 31B8 BF83 4898 E26D 1935 4C5D E2ED E843 7147 3F66 `. `' http://www.rapidpacket.com:81 || http://www.debian.org `- ] * Join the EFF & secure your digital freedoms today! http://eff.org * -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://lists.alioth.debian.org/pipermail/logcheck-devel/attachments/20040428/13fabe6f/attachment.pgp