mark@siva.UUCP (Mark Marsh) (08/11/90)
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. I have looked in the libraries here (ar t <libname>) and found no mention of the function. I also grep'ed the sources and only found the call - no function body. Am I missing somethong from the sources? Is this a vendor supplied library function? What is it supposed to do exactally? -- mark@siva -or- {ames!pacbell!sactoh0}||{ucbvax!ucdavis!csusac!unify}!siva!mark "But, I only did what you didn't tell me not to do!" _Users Credo_
allbery@NCoast.ORG (Brandon S. Allbery KB8JRR/KT) (08/12/90)
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