missing sigsetmask() in bash-1.05 under SCO Xenix
Brandon S. Allbery KB8JRR/KT
allbery at NCoast.ORG
Mon Aug 13 01:44:58 AEST 1990
As quoted from <85 at siva.UUCP> by mark at siva.UUCP (Mark Marsh):
+---------------
| I am missing the sigsetmask() function at link time when compiling
| bash-1.05 under SCO Xenix 2.3 with development version 2.3.1b, and
| alternately using gcc-1.37.1.
+---------------
sigsetmask() is part of the BSD signal mechanism; it can be loosely
approximated by calling sighold() on a signal when its bit is 1 and sigrelse()
if it is 0. (The real sigsetmask() returns the original mask, but there's no
good way to emulate this that I know of, that won't cause problems.)
The following is a rough, UNTESTED (i.e. use at your own risk) quick
approximation to sigsetmask().
I should note that you probably configured bash wrong; I didn't see any calls
to sigsetmask() outside the job-control code, which won't work under SCO Xenix
or SCO Unix (which has job control, but it's of the POSIX variety so bash
won't work.) I might have missed something, though.
int
sigsetmask(mask)
int mask;
{
int sig;
for (sig = 1; sig < NSIG; sig++)
{
if ((mask >>= 1) & 1)
sighold(sig);
else
sigrelse(sig);
}
return 0; /* should return the old mask */
}
++Brandon
--
Me: Brandon S. Allbery VHF: KB8JRR/KT on 220 (soon others)
Internet: allbery at NCoast.ORG Delphi: ALLBERY
uunet!usenet.ins.cwru.edu!ncoast!allbery America OnLine: KB8JRR
More information about the Alt.sources.d
mailing list