Title: | "ASK THE WIZARDS" |
Moderator: | QUARK::LIONEL |
Created: | Mon Oct 30 1995 |
Last Modified: | Mon May 12 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 1857 |
Total number of notes: | 3728 |
Return-Path: "VMS001::WWW"@vms001.das-x.dec.com Received: by vmsmkt.zko.dec.com (UCX V4.1-12, OpenVMS V6.2 VAX); Fri, 25 Apr 1997 17:02:00 -0400 Received: from vms001 by mail11.digital.com (8.7.5/UNX 1.5/1.0/WV) id QAA00163; Fri, 25 Apr 1997 16:56:18 -0400 (EDT) Date: Fri, 25 Apr 1997 16:00:08 -0400 Message-Id: <[email protected]> From: "VMS001::WWW"@vms001.das-x.dec.com (25-Apr-1997 1600) To: [email protected], [email protected], [email protected] Subject: Ask the Wizard: '[email protected]' X-VMS-To: [email protected] Remote Host: insun2.us.oracle.com Browser Type: Mozilla/3.01 (X11; I; AIX 2) Remote Info: <null> Name: Jorge M. Palma V. Email Address: [email protected] CPU Architecture: Alpha Version: v 6.2 Questions: I've written a C program that works as a request server. It reads from a socket the requets coming from an phone answer robot machine and starts a "subprocess" using a fork instruction. The program runs well 7x24, but twice a week the program abort showing the following error: Signal 0000 000C Access violation Args=5 Invalid address error. How can I trap the signals to handle them? Is it better to use the VMS Services to start the subprocess?
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
1773.1 | Please See Programming Concepts Manual | XDELTA::HOFFMAN | Steve, OpenVMS Engineering | Tue Apr 29 1997 13:32 | 26 |
There are two constructs called signals -- one is in C, and C signals are handled via C keywords. The other is the OpenVMS signal, and OpenVMS signals are handled via language keywords or via OpenVMS run-time library calls. (And interestingly, the C signaling mechanism is directly based on the OpenVMS signaling mechanism.) To trap signals, see the OpenVMS Programming Concepts Manual -- that document contains extensive information on designing and coding an OpenVMS signal handler. Be aware that the signal indicated in your question is an access violation (ACCVIO). An ACCVIO usually indicates in illegal or out-of-bounds memory management reference -- there is normally enough information provided with the five SS$_ACCVIO arguments to determine what code is encountering the fault. (For details of the ACCVIO signal, see HELP/MESSAGE ACCVIO.) The OpenVMS RTL and system calls for process control and for I/O operations typically provide more options and more capabilities than do the "generic" C calls. Though the generic C calls have the advantage of portability. Note that the generic C calls use the OpenVMS calls -- the C system() call, for example, uses the lib$spawn() RTL routine. |