Bug#390433: dash: does not execute EXIT trap if shell is killed

2009-02-16 Thread Gerrit Pape
On Sun, Oct 19, 2008 at 04:57:34PM +0100, Chris Lamb wrote:
 Chris Lamb wrote:
  You marked this bug as forwarded but I don't see anything on the mailing
  list about it; should I just look harder?
 
 Any movement on this?

Hi, I got no response from upstream yet.  I applied the patch to
0.5.5.1-1, but it unfortunately causes severe problems (#515229,
#515064), so I removed it again in 0.5.5.1-2.

Regards, Gerrit.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#390433: dash: does not execute EXIT trap if shell is killed

2009-02-16 Thread Chris Lamb
Gerrit Pape wrote:

 I applied the patch to 0.5.5.1-1, but it unfortunately causes severe
 problems (#515229, #515064), so I removed it again in 0.5.5.1-2.

I was never particularly confident in it, hence my desire to see
upstream comment on it.


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org
   `-


signature.asc
Description: PGP signature


Bug#390433: dash: does not execute EXIT trap if shell is killed

2008-10-19 Thread Chris Lamb
Chris Lamb wrote:

 You marked this bug as forwarded but I don't see anything on the mailing
 list about it; should I just look harder?

Any movement on this?


Regards,


-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  [EMAIL PROTECTED]
   `-


signature.asc
Description: PGP signature


Bug#390433: dash: does not execute EXIT trap if shell is killed

2008-10-19 Thread Daniel Baumann
severity 390433 important
thanks

This is a pretty bad bug for those of us who are relaying on correct
trap handling, please apply patch, thanks.

-- 
Address:Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:  [EMAIL PROTECTED]
Internet:   http://people.panthera-systems.net/~daniel-baumann/



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#390433: dash: does not execute EXIT trap if shell is killed

2008-08-01 Thread Chris Lamb
Chris Lamb wrote:

 tags 390433 + patch
 thanks

Hi Gerrit, 

You marked this bug as forwarded but I don't see anything on the mailing
list about it; should I just look harder?


Regards,

-- 
Chris Lamb, UK   [EMAIL PROTECTED]
GPG: 0x634F9A20


signature.asc
Description: PGP signature


Bug#390433: dash: does not execute EXIT trap if shell is killed

2008-06-10 Thread Chris Lamb
tags 390433 + patch
thanks

Patch attached.


Regards,

-- 
Chris Lamb, UK   [EMAIL PROTECTED]
GPG: 0x634F9A20
diff -urNad dash-0.5.4.orig/src/trap.c dash-0.5.4/src/trap.c
--- dash-0.5.4.orig/src/trap.c  2008-06-11 03:51:32.0 +0100
+++ dash-0.5.4/src/trap.c   2008-06-11 03:54:32.0 +0100
@@ -67,6 +67,8 @@
 #define S_HARD_IGN 4   /* signal is ignored permenantly */
 #define S_RESET 5  /* temporary - to reset a hard ignored sig */
 
+#define SIGEXIT 0
+#define DUMMY_ACTION savestr(:)
 
 /* trap handler commands */
 char *trap[NSIG];
@@ -97,7 +99,7 @@
 {
char *action;
char **ap;
-   int signo;
+   int signo, dummysig;
 
nextopt(nullstr);
ap = argptr;
@@ -122,16 +124,32 @@
sh_error(%s: bad trap, *ap);
INTOFF;
if (action) {
-   if (action[0] == '-'  action[1] == '\0')
-   action = NULL;
-   else
+   if (action[0] == '-'  action[1] == '\0') {
+   if (signo != SIGEXIT  trap[0] != NULL)
+   /* Reset dummy handler */
+   action = DUMMY_ACTION;  
+   else
+   action = NULL;
+   } else {
action = savestr(action);
+   }
+   } else {
+   action = DUMMY_ACTION;
}
if (trap[signo])
ckfree(trap[signo]);
trap[signo] = action;
-   if (signo != 0)
+   if (signo == SIGEXIT) {
+   /* Set dummy handlers */
+   for (dummysig = 1 ; dummysig  NSIG ; dummysig++) {
+   if (trap[dummysig] == NULL) {
+   trap[dummysig] = DUMMY_ACTION;
+   setsignal(dummysig);
+   }
+   }
+   } else {
setsignal(signo);
+   }
INTON;
ap++;
}


signature.asc
Description: PGP signature


Bug#390433: dash: does not execute EXIT trap if shell is killed

2008-05-27 Thread Raphael Geissert
user [EMAIL PROTECTED]
usertags 390433 + goal-dash
thanks

I am adding this bug to the dash as /bin/sh RG because IMHO it is relevant.
This bug has actually affected some scripts I wrote and is kind-of annoying.

Thanks,
-- 
Atomo64 - Raphael

Please avoid sending me Word, PowerPoint or Excel attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html


signature.asc
Description: This is a digitally signed message part.


Bug#390433: dash: does not execute EXIT trap if shell is killed

2006-10-01 Thread Martin Dickopp
Package: dash
Version: 0.5.3-3
Severity: normal

Hi,

If I run the this two line script:

  trap 'echo EXIT trap executed' EXIT
  kill -HUP $$

I would expect it to display EXIT trap executed, but it does not
display anything.

(If I add a HUP trap, both the HUP trap and the EXIT trap are executed.)

Cheers,
Martin


-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing'), (200, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.18-2
Locale: LANG=C, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)

Versions of packages dash depends on:
ii  libc62.3.6.ds1-4 GNU C Library: Shared libraries

dash recommends no packages.

-- debconf information:
* dash/sh: true


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]