From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Herring, Davis" Newsgroups: gmane.emacs.devel Subject: RE: Concurrency, again Date: Thu, 20 Oct 2016 07:12:08 +0000 Message-ID: References: <87wq97i78i.fsf@earlgrey.lan> <86k2dk77w6.fsf@molnjunk.nocrew.org> <9D64B8EA-DB52-413D-AE6A-264416C391F3@iotcl.com> <83int1g0s5.fsf@gnu.org> <83twckekqq.fsf@gnu.org> <874m4aic0g.fsf@tromey.com> <7D150317-7A01-464D-8352-942631A3116B@raeburn.org> <8337juxb8h.fsf@gnu.org> <31A629C9-7C3B-4B5D-A5B5-38F556C4E064@raeburn.org> <83wph6vt0f.fsf@gnu.org>, <646C7DAF-F7AB-48C2-AFDF-6881D2990617@raeburn.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1476947589 16634 195.159.176.226 (20 Oct 2016 07:13:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 20 Oct 2016 07:13:09 +0000 (UTC) Cc: Eli Zaretskii , Emacs-Devel devel To: Ken Raeburn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 20 09:13:03 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bx7Wy-0001my-V8 for ged-emacs-devel@m.gmane.org; Thu, 20 Oct 2016 09:12:49 +0200 Original-Received: from localhost ([::1]:52854 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bx7X0-0005Iv-LH for ged-emacs-devel@m.gmane.org; Thu, 20 Oct 2016 03:12:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bx7WU-0005BP-5j for emacs-devel@gnu.org; Thu, 20 Oct 2016 03:12:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bx7WP-0003Fq-7q for emacs-devel@gnu.org; Thu, 20 Oct 2016 03:12:18 -0400 Original-Received: from proofpoint5.lanl.gov ([2001:400:4210:400::a5]:40090) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bx7WP-0003FL-1x; Thu, 20 Oct 2016 03:12:13 -0400 Original-Received: from mailrelay2.lanl.gov (mailrelay2.lanl.gov [128.165.4.103]) by mailgate5.lanl.gov (8.15.0.59/8.15.0.59) with ESMTP id u9K7C9iD004997; Thu, 20 Oct 2016 01:12:09 -0600 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mailrelay2.lanl.gov (Postfix) with ESMTP id B0725F4D926; Thu, 20 Oct 2016 01:12:09 -0600 (MDT) X-NIE-2-Virus-Scanner: amavisd-new at mailrelay2.lanl.gov Original-Received: from ECS-EXG-P-CH01.win.lanl.gov (ecs-exg-p-ch01.win.lanl.gov [128.165.106.11]) by mailrelay2.lanl.gov (Postfix) with ESMTP id 98F55F4D923; Thu, 20 Oct 2016 01:12:09 -0600 (MDT) Original-Received: from ECS-EXG-P-MB01.win.lanl.gov ([169.254.1.164]) by ECS-EXG-P-CH01.win.lanl.gov ([128.165.106.11]) with mapi id 14.03.0319.002; Thu, 20 Oct 2016 01:12:08 -0600 Thread-Topic: Concurrency, again Thread-Index: AQHSKSwzGs/PWjjbOk2HH6SeibkvQ6Cv9nUAgAD4ltw= In-Reply-To: <646C7DAF-F7AB-48C2-AFDF-6881D2990617@raeburn.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [128.165.106.44] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.15.154, 1.0.3, 0.0.0000 definitions=2016-10-20_03:2016-10-18, 2016-10-20, 1970-01-01 signatures=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 2001:400:4210:400::a5 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:208524 Archived-At: > we do that by calling waitpid() but then the kernel discards the child=0A= > process=92s status info, so the "correct" thread can no longer respond=0A= > to the signal by making another waitpid() call to collect the status=0A= > info. We=92d have to save the info the first time we call waitpid().=0A= > But doing it from within the signal handler could be tricky, because=0A= > in that context we=92re limited to async-signal-safe functions, and=0A= > helpful routines like malloc() and pthread_mutex_lock() aren=92t on the= =0A= > list.=0A= =0A= waitid() supports the WNOWAIT flag that peeks at the child information with= out destroying it: http://pubs.opengroup.org/onlinepubs/9699919799/function= s/waitid.html=0A= =0A= Davis=0A=