Segmentation Violation
Jeff Harrison
jeffaharrison at yahoo.com
Wed Jul 21 09:57:05 PDT 2010
--- On Wed, 7/21/10, Kenneth Brody <kenbrody at spamcop.net> wrote:
> From: Kenneth Brody <kenbrody at spamcop.net>
> Subject: Re: Segmentation Violation
> To: "George Simon" <GSimon at americanriverintl.com>
> Cc: "filepro-list at lists.celestial.com" <filepro-list at lists.celestial.com>
> Date: Wednesday, July 21, 2010, 12:09 PM
> On 7/21/2010 10:41 AM, George Simon
> wrote:
> > I've been asked the following question by one of our
> programmers that is experiencing difficulties with
> segmentation violations.
> >
> > "George,
> >
> > If you have any information on this, it would be
> great. But, could you message the filePro list
> > to see if there is a way to exit from a segmentation
> violation if a process crashes on the cron?
> >
> > Thanks"
> >
> > I told him that I did not think so but would post the
> question here.
> [...]
>
> A SEGV means the program has already exited.
>
> Well, to be more specific, in the case of filePro, filePro
> catches the
> SIGSEGV signal, does some quick cleanup, outputs
> "***segmentation
> violation", and then exits.
>
> Are you saying this isn't the case on your system?
>
> --
> Kenneth Brody
Probably what George is looking for here is a way to detect (from the parent shell) that a child filepro process has failed with a segmentation violation. That way he can trigger an alert, or perhaps just prevent another dependent process from running.
One way to do this would be to use the filepro exit command. Have the process exit with a certain non-zero status upon a normal exit. Have the calling process check for this status and if it doesn't get it act accordingly. As I recall a segv will yield a zero exit status so that is why you need to set it to something else for a normal exit.
Jeff Harrison
jeffaharrison at yahoo.com
Author of JHExport and JHImport. The fastest and easiest way to export and import filepro data.
More information about the Filepro-list
mailing list