Xref: utzoo comp.sources.d:5754 alt.sources.d:735 Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!rutgers!mailrus!usenet.ins.cwru.edu!ncoast!allbery From: allbery@NCoast.ORG (Brandon S. Allbery KB8JRR/KT) Newsgroups: comp.sources.d,alt.sources.d Subject: Re: missing sigsetmask() in bash-1.05 under SCO Xenix Message-ID: <1990Aug12.154458.6113@NCoast.ORG> Date: 12 Aug 90 15:44:58 GMT References: <85@siva.UUCP> Reply-To: allbery@ncoast.ORG (Brandon S. Allbery KB8JRR/KT) Followup-To: comp.sources.d Distribution: usa Organization: North Coast Public Access *NIX, Cleveland, OH Lines: 41 As quoted from <85@siva.UUCP> by mark@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@NCoast.ORG Delphi: ALLBERY uunet!usenet.ins.cwru.edu!ncoast!allbery America OnLine: KB8JRR