473,324 Members | 2,548 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

$SIG{__DIE__} problem

bzd
Hello
I wrote a simple mail filtering script using Mail::Audit. It works
fine, but I'd like to overload DIE signal handler, so the script
would not send back "Undelivered Mail Returned to Sender" with
die output if there are any errors. It should just log exception
mesg or mail it directly to me.
I've tried
$SIG{__DIE__} = sub {
print LOG "DIE: ".$_[0];
$incoming_mail->ignore; # for Mail::Audit
}
but it doesn't work. $SIG{__DIE__} does work in simple testcase
though, like opening non-existing file, so I'm probabbly missing
something. Could anyone help?

regards,
artb.
--
only so many songs can be sung with two lips two lungs and one tongue

Jul 19 '05 #1
1 3907
bzd <bz*****@wp.pl.fake> wrote in message news:<pa**************************@wp.pl.fake>...
I wrote a simple mail filtering script using Mail::Audit. It works
fine, but I'd like to overload DIE signal handler, so the script
would not send back "Undelivered Mail Returned to Sender" with
die output if there are any errors.


That does not sound like a good enough reason to use $SIG{__DIE__}.

For normal everyday execption handing use eval{}.

$SIG{__DIE__} is only for very special cases where you really need to
get involved in low-level stuff.

This newsgroup does not exist (see FAQ). Please do not start threads
here.
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jacek Generowicz | last post by:
Has anyone else experienced problems in submitting articles to the C++-sig? I've tried both via Gmane, and directly via mail, without success. Eventually I got the following back: -----...
1
by: David. E. Goble | last post by:
Hi all; I have the following files; index.html, sigsheader.js, sigsboby.js, smilesbody.js and smiles.js. The sourse is below. The page displays two manual slide shows... Each slideshow has a set...
7
by: David. E. Goble | last post by:
Hi all; I have the following files; index.html, sigsheader.js, sigsboby.js, smilesbody.js and smiles.js. The sourse is below. The page displays two manual slide shows... Each slideshow has a set...
4
by: Trevor Best | last post by:
I have a report that's fairly simple, page headers and footers, detail has a subreport in (can vary in length). The customer wanted a signature block for them, their client and 3rd party. This was...
4
by: foodic | last post by:
Hi all, I am new to C programming. I have seen in many Source files a declaration as follows, typedef void iamafresher(int x, int y); why they use typedef with function. Please help,
20
by: vitorjol | last post by:
Hello. I have 2 forms (Form1 and Form2). When i call the Sub placed in form1 from form2, i get the error "object reference not set to an instance of an object" ! What can i do to solve the...
26
by: empriser | last post by:
#define XLOG( ... ) \ do{ \ sprintf( SysBuf, " ", curtime(), __FILE__ , __LINE__ , __FUNCTION__ ); \ sprintf( SysBuf + strlen( SysBuf ), __VA_ARGS__ ); \ xlog( SysBuf ); \ }while(0) I...
3
by: Harry | last post by:
#include<stdio.h> #include<stdlib.h> #include<malloc.h> void scramble(void); struct bmp_header { short int sig; int size_bmp;
105
by: sw | last post by:
Hi all, I have a news website tat is developed on joomla 1.5.Login facility is done thru a login component.On each page,ther s a 'Log In' link that redirects them to a login page.On successful...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.