home *** CD-ROM | disk | FTP | other *** search
- Submitted-by: mib@geech.gnu.ai.mit.edu (Michael I Bushnell)
-
- In article <1992Feb26.202432.17940@uunet.uu.net> WULKAN@TOROLAB6.VNET.IBM.COM ("Mike Wulkan") writes:
-
- On a similar note, there seems to be a contradiction in the
- section describing SIG_IGN which reads:
-
- "Delivery of the signal shall have no effect on the process.
- The behavior of a process is undefined after it ignores a SIGFPE,
- SIGILL, or SIGSEGV signal ..."
-
- Why would the behavior of a process be UNDEFINED if the signal has NO
- EFFECT on the process? Obviously the signal has an effect! Why not
- simply disallow SIG_IGN to be specified for SIGFPE, SIGILL and SIGSEGV as
- is done for SIGKILL and SIGSTOP? At the very least it would seem that
- the section would be more accurately worded:
-
- The behavior of the process is undefined after a SIGFPE, SIGILL, or
- SIGSEGV signal is delivered, otherwise delivery of the signal shall
- have no effect on the process.
-
- It isn't the signal that has the effect. It's that the machine will
- do something odd. For example, on a Vax, an illegal memory reference
- is a fault. If the generated signal is ignored, the result is an
- infinite loop. It is useful for the OS to specify this. On the other
- hand, it is also useful for Posix to leave it undefined, because
- different hardware and different OS's recover from such things
- differently.
-
- If you just do `kill -ILL 387', and process 387 has set the handler
- for SIGILL to SIG_IGN, truly nothing should happen. I believe Posix
- should specify this, but I don't believe it does.
-
- The confusion here is between the hardward (implementation-defined)
- event causing the signal and the signal itself.
-
- Your suggested fix is not adequate, however. People should be able to
- catch illegal references in programs, and then be able to exit nicely.
- Your "fix" precludes doing so portably.
-
- -mib
- --
- Michael Innis Bushnell | This is a virulent meme. Whether or not you place
- Email: mib@gnu.ai.mit.edu | this into your signature file is irrelevant. You
- Phone: (617) 625-4518 | have already participated in its further trans-
- | mission, and will doubtless continue to do so.
-
-
- Volume-Number: Volume 27, Number 17
-
-