Debian Codegraph @

libsrc/os/vms/oss.c

raw
1 /* @(#)oss.c 19.1 (ES0-DMD) 02/25/03 13:56:14 */
2 /*===========================================================================
3 Copyright (C) 1995 European Southern Observatory (ESO)
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2 of
8 the License, or (at your option) 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
16 License along with this program; if not, write to the Free
17 Software Foundation, Inc., 675 Massachusetss Ave, Cambridge,
18 MA 02139, USA.
19
20 Corresponding concerning ESO-MIDAS should be addressed as follows:
21 Internet e-mail: [email protected]
22 Postal address: European Southern Observatory
23 Data Management Division
24 Karl-Schwarzschild-Strasse 2
25 D 85748 Garching bei Muenchen
26 GERMANY
27 ===========================================================================*/
28
29 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
30 .TYPE Module
31 .NAME oss
32 .LANGUAGE C
33 .AUTHOR IPG-ESO Garching
34 .CATEGORY Host operating system interfaces. Interprocess signals.
35 .COMMENTS Dummy version for VMS system.
36 .VERSION [1.1] 02-Mar-1990 Implementation. C.Guirao
37 ------------------------------------------------------------*/
38
39 int osssend(pid, sig)
40 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
41 .PURPOSE send a signal to a process
42 .RETURNS Upon successful completion a value of zero is returned, else 0
43 is returned and ``oserror'' is set to the actual error code.
44 .REMARKS Dummy version.
45 ------------------------------------------------------------*/
46 int pid; /* IN : process identification */
47 int sig; /* IN : signal (interruption) logical name */
48 {
49 return(0);
50 }
51
52 int ossinhib(sig)
53 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
54 .PURPOSE Inhibit the receipt of a signal (Ignore the signal if it
55 comes)
56 .RETURNS Value 0 on normal return.
57 .REMARKS Dummy version.
58 .REMARKS System dependencies:
59 .REMARKS This routine acts as a declarative statement : it means that
60 its effect continues until the end of the calling process or
61 until a new call to this routine for the same signal type.
62 It is then better located in the beginning of a program.
63 ------------------------------------------------------------*/
64 int sig; /* IN : signal identification as in <signal.h> */
65 {
66 return(0);
67 }
68
69 int osscatch(sig, function)
70 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
71 .PURPOSE Catch a signal and execute a given function when received.
72 .RETURNS Value 0 on normal return.
73 .REMARKS System dependencies:
74 .REMARKS Dummy version.
75 .REMARKS This routine acts as a declarative statement : it means that
76 its effect continues until the end of the calling process or
77 until a new call to this routine for the same signal type.
78 It is then better located in the beginning of a program.
79 ------------------------------------------------------------*/
80 int sig; /* IN : signal identification (see signal.h) */
81 int (* function)(); /* IN : address of the function to be */
82 /* executed when signal is caught */
83 {
84 return(0);
85 }
86
87 int osswait(sig,time_out)
88 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
89 .PURPOSE Waits for signal to be received.
90 .RETURNS Value -1 if something wrong happened, 0 is a signal has been
91 received before the timeout, 1 if stopped for time out .
92 .REMARKS System dependencies:
93 .REMARKS Dummy version.
94 .REMARKS This routine acts as an executable statement : it means that
95 its effect will be to wait for the given signal (!! One can only
96 wait for a signal that it is possible to send (INT, ALRM, TERM, USR1
97 or USR2). The execution
98 of the calling process will be interrupted during this wait
99 time. The execution will continue if the given signal is received
100 or if the time out period is expired.
101 This routine is best used with ``osssend'' to suspend and resume
102 programmes execution.
103 ------------------------------------------------------------*/
104 int sig; /* IN : signal identification (see signal.h) */
105 unsigned time_out; /* IN : amount of seconds allowed for the */
106 /* wait (0 = infinite) */
107 {
108 return(0);
109 }
110
111 int catch()
112 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
113 .PURPOSE dummy routine to allow the pause call to return
114 .RETURNS always zero
115 .REMARKS ``sig'' is mandatory parameter always passed to a routine
116 called from osscatch.
117 .REMARKS sets the status variable to one if called.
118 ------------------------------------------------------------------*/
119 {
120 return(0);
121 }