signal(3f) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

signal(3f)

signal(3F)                 Fortran Library Functions                signal(3F)

NAME
       signal - change the action for a signal

SYNOPSIS
       integer*4 function signal(signum, proc, flag)
       integer*4 signum, flag
       external proc


       For 64-bit environments:
       integer*8 function signal(signum, proc, flag)
       integer*8 flag
       integer*4 signum
       external proc


       When compiling for 64-bit environments, with compiler option
       -m64, proc, and flag must be declared integer*8 as  well  as  any
       variables receiving the result from signal.

DESCRIPTION
       If  a  process  incurs a signal (see signal(3C)), the default action is
       usually to clean up and abort. You can choose to write  an  alternative
       signal handling routine. A call to signal is the way this alternate ac‐
       tion is specified to the system.


       Input:


       signum  is the signal number (see signal.h(3HEAD)). proc is the name of
       a user signal handling routine. If flag is negative, then proc must  be
       the  name of the user signal handling routine. If flag is zero or posi‐
       tive, then proc is ignored and the value of flag is passed to the  sys‐
       tem  as the signal action definition. In particular, this is how previ‐
       ously saved signal actions can be restored.  Two  possible  values  for
       flag have specific meanings:


         0 means "use the default action."  See NOTES below.
         1 means "ignore this signal."




       Output:


       A  positive  returned  value is the previous action definition. A value
       greater than 1 is the address of a routine that was to have been called
       on occurrence of the given signal. A negative  returned  value  is  the
       negation of a system error code. See perror(3F). The returned value can
       be used in subsequent calls to signal to restore a previous action def‐
       inition.

FILES
       libfsu.a, libfsu.so.

SEE ALSO
       kill(1), kill(3F), perror(3F), signal(3C)

NOTES
       When  a negative flag value is desired in a 64-bit environment, use the
       INTEGER*8 literal value -1_8 in the call to signal.


       If the user signal handler is called, it is passed the signal number as
       an integer argument.


       This function may fail if the code for a function passed to it as  flag
       is  loaded at addresses with the high bit set. This will be interpreted
       as a negative value for flag when the behavior for positive  values  is
       desired.  This is less likely to happen in 64-bit environments, or with
       statically-linked code.


       On Linux systems, the signal() man page is in man page  section  2  and
       the signal numbers are in section 7.

Studio 12.6                     September 2015                      signal(3F)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3