source: tol/toltcl/generic/crash.c @ 578c841

1941-docker-image-to-testdevel
Last change on this file since 578c841 was 6d7779d, checked in by Jorge Pérez <josp.jorge@…>, 18 years ago

initial import

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@1 be4846ae-f051-483a-831f-b64e7d08527f

  • Property mode set to 100644
File size: 998 bytes
Line 
1/* crash.c: GNU/tolTcl Library
2
3   Copyright (C) 2001, 2002, 2003 - Bayes Decisión, SL
4
5   This program is free software; you can redistribute it and/or modify
6   it under the terms of the GNU General Public License as published by
7   the Free Software Foundation; either version 2, or (at your option)
8   any later version.
9
10   This program is distributed in the hope that it will be useful,
11   but WITHOUT ANY WARRANTY; without even the implied warranty of
12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   GNU General Public License for more details.
14
15   You should have received a copy of the GNU General Public License
16   along with this program; if not, write to the Free Software
17   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18   USA.
19 */
20
21#include <tt_crash.h>
22#include <signal.h>
23
24jmp_buf jmp_mark;
25
26void signalSIGSEGV( int signum )
27{
28  longjmp( jmp_mark, 1 );
29}
30
31int InitCrashHandler()
32{
33  return signal( SIGSEGV, signalSIGSEGV ) != SIG_ERR;
34}
Note: See TracBrowser for help on using the repository browser.