Date: Fri, 17 Oct 1997 08:52:14 +0930 From: Greg Lehey <grog@lemis.com> To: Wolfgang Neumann <neumann@mailhost.rsn.hp.com> Cc: Jacques Hugo <jacques@wired.ctech.ac.za>, questions@FreeBSD.ORG, hacker@FreeBSD.ORG Subject: Re: sig 11 and sig 10 Message-ID: <19971017085214.27446@lemis.com> In-Reply-To: <3445FEDA.6107@convex.hp.com>; from Wolfgang Neumann on Thu, Oct 16, 1997 at 01:47:38PM %2B0200 References: <3445B031.167EB0E7@wired.ctech.ac.za> <3445FEDA.6107@convex.hp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Oct 16, 1997 at 01:47:38PM +0200, Wolfgang Neumann wrote: > Jacques Hugo wrote: >> >> Hi there ... >> >> I know what a sig 11 exit is, but why does >> sig 10 occur? > > If the entries are in order (don't know about that) you could reference > the signal list given in sigaction(2) and count down from top. > > Just a wild guess but maybe it helps ... Take a look at /usr/include/sys/signal.h: #define SIGHUP 1 /* hangup */ #define SIGINT 2 /* interrupt */ #define SIGQUIT 3 /* quit */ #define SIGILL 4 /* illegal instruction (not reset when caught) */ #ifndef _POSIX_SOURCE #define SIGTRAP 5 /* trace trap (not reset when caught) */ #endif #define SIGABRT 6 /* abort() */ #ifndef _POSIX_SOURCE #define SIGIOT SIGABRT /* compatibility */ #define SIGEMT 7 /* EMT instruction */ #endif #define SIGFPE 8 /* floating point exception */ #define SIGKILL 9 /* kill (cannot be caught or ignored) */ #ifndef _POSIX_SOURCE #define SIGBUS 10 /* bus error */ #endif #define SIGSEGV 11 /* segmentation violation */ #ifndef _POSIX_SOURCE #define SIGSYS 12 /* non-existent system call invoked */ #endif #define SIGPIPE 13 /* write on a pipe with no one to read it */ #define SIGALRM 14 /* alarm clock */ #define SIGTERM 15 /* software termination signal from kill */ #ifndef _POSIX_SOURCE #define SIGURG 16 /* urgent condition on IO channel */ #endif #define SIGSTOP 17 /* sendable stop signal not from tty */ #define SIGTSTP 18 /* stop signal from tty */ #define SIGCONT 19 /* continue a stopped process */ #define SIGCHLD 20 /* to parent on child stop or exit */ #define SIGTTIN 21 /* to readers pgrp upon background tty read */ #define SIGTTOU 22 /* like TTIN for output if (tp->t_local<OSTOP) */ #ifndef _POSIX_SOURCE #define SIGIO 23 /* input/output possible signal */ #define SIGXCPU 24 /* exceeded CPU time limit */ #define SIGXFSZ 25 /* exceeded file size limit */ #define SIGVTALRM 26 /* virtual time alarm */ #define SIGPROF 27 /* profiling time alarm */ #define SIGWINCH 28 /* window size changes */ #define SIGINFO 29 /* information request */ #endif #define SIGUSR1 30 /* user defined signal 1 */ #define SIGUSR2 31 /* user defined signal 2 */ The original question was: I know what a sig 11 exit is, but why does sig 10 occur? A signal isn't an exit, of course. It's a software interrupt. As to the difference, from "Porting UNIX Software": The difference between the signals SIGBUS and SIGSEGV is purely historical: it relates to the PDP-11 hardware interrupt that detected the problem. In modern systems, it depends on the whim of the implementor when you get which signal. POSIX.1 defines only SIGSEGV, but this doesn't help much if the processor generates SIGBUS anyway. It's best to treat them as being equivalent. I didn't know that FreeBSD generates SIGBUS. Where do you see it? Greg
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19971017085214.27446>