1998Q3/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: Yet another update on threads and signals -->
<!--X-From-R13: f001tzhNabin.jevtug.rqh -->
<!--X-Date: Fri, 14 Aug 1998 11:32:35 &#45;0700 -->
<!--X-Message-Id: Pine.PMDF.3.95.980814142917.541296311A&#45;100000#nova,wright.edu -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 19980814102241.A8498#yuma,Princeton.EDU -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Re: Yet another update on threads and signals</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:s001gmu#nova,wright.edu">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
      text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">

  <font size="+4" color="#804040">
    <strong><em>MUD-Dev<br>mailing list archive</em></strong>
  </font>
      
<br>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00718.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00720.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00718.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00715.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00719">Author</A>
&nbsp;|&nbsp;<A HREF="#00719">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00719">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: Yet another update on threads and signals</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Subject</em>: [MUD-Dev] Re: Yet another update on threads and signals</LI>
<LI><em>From</em>: <A HREF="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</A></LI>
<LI><em>Date</em>: Fri, 14 Aug 1998 14:32:05 -0400 (EDT)</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>


On Fri, 14 Aug 1998, Adam J. Thornton wrote:

&gt; OK, so trapping the signal in a signal handler won't work, because the
&gt; POSIX thread functions are not reentrant.
&gt; 
&gt; However, using sigwait() will, so instead of a signal handler, I'll spawn a
&gt; thread whose only purpose in like is to wait for that signal and, upon
&gt; receiving it, do its magic.  It can just block in sigwait() until the
&gt; signal is delivered.

I do recall thinking that this was the best way to handle signals with
threads.  Just have all threads but one block all signals (that they can),
and leave that one thread as a signal handler.  There is a section in the
POSIX book on pthreads that discusses threads and signals, but I don't
remember much other than the signal-handler thread method.  If people are
interested, I can re-read it and summarize the chapter and post it here
later tonight/tomorrow.

-Greg




</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00718" HREF="msg00718.html">[MUD-Dev] Yet another update on threads and signals</A></STRONG>
<UL><LI><EM>From:</EM> "Adam J. Thornton" &lt;adam#phoenix,Princeton.EDU&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00718.html">[MUD-Dev] Yet another update on threads and signals</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00720.html">[MUD-Dev] OT: access</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00718.html">[MUD-Dev] Yet another update on threads and signals</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00715.html">[MUD-Dev] Passing file descriptors to other processes</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00719"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00719"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><STRONG>[MUD-Dev] Re: Private Re: [Mud-Dev] Re: Affordances and   social method</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00752" HREF="msg00752.html">[MUD-Dev] Re: Private Re: [Mud-Dev] Re: Affordances and   social method</A></strong>, 
Mike Sellers <a href="mailto:mike#bignetwork,com">mike#bignetwork,com</a>, Mon 17 Aug 1998, 14:34 GMT
</LI>
</ul>
</ul>
</ul>
</ul>
</ul>
</LI>
<LI><strong><A NAME="00722" HREF="msg00722.html">[MUD-Dev] Re: Affordances and  social method</A></strong>, 
cat <a href="mailto:cat#bga,com">cat#bga,com</a>, Fri 14 Aug 1998, 21:34 GMT
<LI><strong><A NAME="00720" HREF="msg00720.html">[MUD-Dev] OT: access</A></strong>, 
s001gmu <a href="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</a>, Fri 14 Aug 1998, 18:48 GMT
<LI><strong><A NAME="00718" HREF="msg00718.html">[MUD-Dev] Yet another update on threads and signals</A></strong>, 
Adam J. Thornton <a href="mailto:adam#phoenix,Princeton.EDU">adam#phoenix,Princeton.EDU</a>, Fri 14 Aug 1998, 14:24 GMT
<UL>
<LI><strong><A NAME="00719" HREF="msg00719.html">[MUD-Dev] Re: Yet another update on threads and signals</A></strong>, 
s001gmu <a href="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</a>, Fri 14 Aug 1998, 18:32 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00715" HREF="msg00715.html">[MUD-Dev] Passing file descriptors to other processes</A></strong>, 
Adam J. Thornton <a href="mailto:adam#phoenix,Princeton.EDU">adam#phoenix,Princeton.EDU</a>, Fri 14 Aug 1998, 03:18 GMT
<LI><strong><A NAME="00711" HREF="msg00711.html">[MUD-Dev] Re: Methods to Reduce Ecological Wipeout (fwd)</A></strong>, 
Marc Hernandez <a href="mailto:marc#jb,com">marc#jb,com</a>, Thu 13 Aug 1998, 20:44 GMT
<LI><strong><A NAME="00708" HREF="msg00708.html">[MUD-Dev] Re: avoiding ecological wipeout</A></strong>, 
Laurel Fan <a href="mailto:lf25+@andrew.cmu.edu">lf25+@andrew.cmu.edu</a>, Thu 13 Aug 1998, 20:13 GMT
<LI><strong><A NAME="00707" HREF="msg00707.html">[MUD-Dev] OGR: Ion Storm's Witchboy talks about the functionality of enemy AI.</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Thu 13 Aug 1998, 20:06 GMT
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>