Browse Prior Art Database

Method to Integrate a Signal() Function with OS/2 Distributed Computing Environment Pthreads' Sigaction() Function

IP.com Disclosure Number: IPCOM000114629D
Original Publication Date: 1995-Jan-01
Included in the Prior Art Database: 2005-Mar-29
Document File: 2 page(s) / 120K

Publishing Venue

IBM

Related People

Hidalgo, DS: AUTHOR [+3]

Abstract

Disclosed is an invention which provides a method that can be used to resolve the coexistance problem between the OS/2* Distributed Computing Environment (DCE)** pthreads emulation of the UNIX*** sigaction() function, the OS/2 emulation of the UNIX signals not supported by the OS/2 C compiler runtime signal() function, and the latter.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 49% of the total text.

Method to Integrate a Signal() Function with OS/2 Distributed Computing
Environment Pthreads' Sigaction() Function

      Disclosed is an invention which provides a method that can be
used to resolve the coexistance problem between the OS/2* Distributed
Computing Environment (DCE)** pthreads emulation of the UNIX***
sigaction() function, the OS/2 emulation of the UNIX signals not
supported by the OS/2 C compiler runtime signal() function, and the
latter.

      The emulation of UNIX system calls is an accepted approach to
porting UNIX C source code to OS/2.  The differences in signal
semantics between these two operating systems makes the emulation of
signal related system calls particularly challenging.  Furthermore,
when UNIX C source programs that use DCE pthreads are ported to OS/2
the problem of providing coexisting support for calls to the signal()
function for signals that, depending on the the signal, could be
handled by either an emulation in the emulation library, the OS/2 DCE
pthreads exception handling mechanisms, or by the OS/2 C compiler
runtime library.  The problem lies in that the program making the
signal(handler,sig) call isn't aware of how the support for the
signal whose value is indicated by the sig parameter is implemented
under OS/2.  For portability reasons no change to the signal() caller
is desirable.  This invention provides a method that can be used to
provide a solution to that problem.

      Providing transparent port support in OS/2 for UNIX signal(),
sigaction(), and related functions require a combination of solutions
that need to be implemented in both the library of OS/2 emulations of
UNIX functions, and in the OS/2 DCE pthreads library.  Signals such
as SIGALRM, SIGUSR1, SIGUSR2 and SIGUSR3 need to have their support
emulated in the emulation library because they need to use resources
that belong only to that library.  Also, the signal() function must
be emulated within the emulation library since this library must make
those emulations available to programs that may not link to the OS/2
DCE library.  Furthermore, the emulated signal() function must also
relay its calls to and coexist with the C compiler runtime signal()
function when it is called to install signal handlers for signals
that have UNIX compatible support in the C compiler runtime library.
Finally, signal handlers that are installed through sigaction() calls
need to have their support in the OS/2 DCE pthreads library because
that support must coexist with the pthreads TRY/CATCH scheme as
supported by other DCE platforms.

      The above scenario presents a coexistence problem that is
resolved by the integration method provided by this invention.

      The main problem in the integration of UNIX compatible signal
support in OS/2 is caused by the fact that such support is scattered
in three different libraries: (1) The C compiler runtime library,
which provides UNIX compatible support for some signals.  (2) The
O...