home *** CD-ROM | disk | FTP | other *** search
-
-
-
- SIGNAL(3) MINTLIB LIBRARY FUNCTIONS SIGNAL(3)
-
-
- N✓NA✓AM✓ME✓E
- signal - software signal facilities
-
- S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
- #include <signal.h>
-
- __Sigfunc signal(int sig, __Sigfunc func);
-
- __Sigfunc is defined in <signal.h> in the following way:
- typedef void (*__Sigfunc) (int signum);
-
- D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
- Signals are only handled properly when MiNT is active.
- You are advised to read the entries for Psignal, Psigac-
- tion, Psigpause and Psigblock for the mechanism used.
- When MiNT is not active, signals are emulated under TOS.
- This fails to handle all types of signals properly.
-
- Signals for MiNT are explained in the document signal.doc,
- which comes with the MiNT distribution.
-
- A signal is generated by some abnormal event, initiated by
- a user at a terminal (quit, interrupt, stop), by a program
- error (bus error, etc.), by request of another program
- (kill), or when a process is stopped because it wishes to
- access its control terminal while in the background. Sig-
- nals are optionally generated when a process resumes after
- being stopped, when the status of child processes changes,
- or when input is ready at the control terminal. Most sig-
- nals cause termination of the receiving process if no
- action is taken; some signals instead cause the process
- receiving them to be stopped, or are simply discarded if
- the process has not requested otherwise. Except for the
- SIGKILL and SIGSTOP signals, the signal call allows sig-
- nals either to be ignored or to interrupt to a specified
- location. For a list of signals and their default
- actions, see the file signal.doc.
-
- If func is SIG_DFL, the default action for signal sig is
- reinstated. If func is SIG_IGN the signal is subsequently
- ignored and pending instances of the signal are discarded.
- Otherwise, when the signal occurs further occurrences of
- the signal are automatically blocked and func is called.
-
- A return from the function unblocks the handled signal and
- continues the process at the point it was interrupted.
-
- After a fork or vfork the child inherits all signals. An
- execve resets all caught signals to the default action;
- ignored signals remain ignored.
-
- R✓RE✓ET✓TU✓UR✓RN✓N V✓VA✓AL✓LU✓UE✓ES✓S
- signal returns the previous action on success. On fail-
- ure, it returns -1 and sets errno to indicate the error.
-
-
-
- MiNT docs 0.1 3 March 1993 1
-
-
-
-
-
- SIGNAL(3) MINTLIB LIBRARY FUNCTIONS SIGNAL(3)
-
-
- S✓SE✓EE✓E A✓AL✓LS✓SO✓O
- e✓ex✓xe✓ec✓cv✓ve✓e(✓(3✓3)✓),✓, f✓fo✓or✓rk✓k(✓(3✓3)✓),✓, g✓ge✓et✓tr✓rl✓li✓im✓mi✓it✓t(✓(3✓3)✓),✓, k✓ki✓il✓ll✓l(✓(3✓3)✓),✓, s✓si✓ig✓gb✓bl✓lo✓oc✓ck✓k(✓(3✓3)✓),✓,
- s✓si✓ig✓gs✓se✓et✓tm✓ma✓as✓sk✓k(✓(3✓3)✓),✓, v✓vf✓fo✓or✓rk✓k(✓(3✓3)✓)
-
- N✓NO✓OT✓TE✓E
- As the document signal.doc shows, signals under MiNT work
- in a rather different way than the UN*X version. Also,
- the names and types of signals supported are different
- from the UN*X version.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MiNT docs 0.1 3 March 1993 2
-
-
-