Bug 91540 - [patch] shells/es panic: initsignals: bad signal in sigmsgs.c: siglwp (see mksignal)
Summary: [patch] shells/es panic: initsignals: bad signal in sigmsgs.c: siglwp (see mk...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pav Lucistnik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-09 01:00 UTC by Sam Sirlin
Modified: 2006-01-10 18:45 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Sirlin 2006-01-09 01:00:18 UTC
/usr/ports/shells/es builds but does not run on amd64/FBSD 6.  
 
mksignal tries to build some definitions, but at least for my system adds
too many and runs afoul of the check in signals.c
In particular, SIGLWP == NSIG
 
Note:
 /sys/signal.h:#define  SIGLWP          SIGTHR
and SIGTHR was already a problem.

Fix: 

The following is a diff against the original mksignal, and fixes the problem
addressed by patch-mksignal -- it is a replacement. I just added 2 lines
that do a check against NSIG when defining signals. This seems better to
me than just adding ignores as it's general -- it will still work if the
signals get renumbered (as they apparently were).
 
 --- patch-mksignal2 begins here ---
 --- mksignal.orig    Mon Jan  2 19:28:47 2006
 +++ mksignal    Sat Jan  7 17:52:43 2006
 @@ -141,7 +141,9 @@
                  lcname = lcname c
              }
              print "#ifdef", signal
 +            print "#if ", signal, " < NSIG"
              printf "\t{ %s,\t\"%s\",\t\"%s\" },\n", signal, lcname, mesg[signal]
 +            print "#endif"
              print "#endif"
          }
      }
 --- patch-mksignal2 ends here ---
How-To-Repeat: Just try to run :
 celeborn.my.domain{sam} > ./es
 es panic: initsignals: bad signal in sigmsgs.c: siglwp (see mksignal)
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2006-01-09 01:58:25 UTC
Responsible Changed
From-To: gnats-admin->freebsd-ports-bugs

Rescue this PR from the 'pending' category.
Comment 2 Pav Lucistnik freebsd_committer freebsd_triage 2006-01-10 12:44:41 UTC
Dear maintainer of FreeBSD port shells/es, please take a look at

http://www.freebsd.org/cgi/query-pr.cgi?q=91540

Do you approve this update?

-- 
Pav Lucistnik <pav@oook.cz>
              <pav@FreeBSD.org>

It also explains why paper clips just lie there while you look at them,
but as soon as you turn your back, they run away, giggling wildly,
and transform themselves into coat hangers.
Comment 3 Pav Lucistnik freebsd_committer freebsd_triage 2006-01-10 12:44:44 UTC
State Changed
From-To: open->feedback

Ask maintainer for approval 


Comment 4 Pav Lucistnik freebsd_committer freebsd_triage 2006-01-10 12:44:44 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pav

Take
Comment 5 rittle 2006-01-10 18:27:58 UTC
> Dear maintainer of FreeBSD port shells/es, please take a look at
> http://www.freebsd.org/cgi/query-pr.cgi?q=91540

> Do you approve this update?

Yes, this replacement patch is fine.  I think we must assume that
classic signals (such as would be of use to a shell) will always be
less than NSIG.  If that assumption is ever changed, then we need a
much different patch to this shell.

Regards,
Loren
Comment 6 Pav Lucistnik freebsd_committer freebsd_triage 2006-01-10 18:45:41 UTC
State Changed
From-To: feedback->closed

Committed, thanks!