From owner-freebsd-current@FreeBSD.ORG Sat Jun 30 14:41:43 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B44BD16A473 for ; Sat, 30 Jun 2007 14:41:43 +0000 (UTC) (envelope-from michiel@boland.org) Received: from neerbosch.nijmegen.internl.net (neerbosch.nijmegen.internl.net [217.149.193.38]) by mx1.freebsd.org (Postfix) with ESMTP id 5318A13C4C8 for ; Sat, 30 Jun 2007 14:41:43 +0000 (UTC) (envelope-from michiel@boland.org) Received: from neerbosch.nijmegen.internl.net by neerbosch.nijmegen.internl.net via neerbosch.nijmegen.internl.net [217.149.193.38] with ESMTP for id l5UEfgBS000300 (8.13.4/1.4); Sat, 30 Jun 2007 16:41:42 +0200 (MEST) Received: from localhost by neerbosch.nijmegen.internl.net via mboland@localhost with ESMTP for id l5UEfgpM000297 (8.13.4/2.02); Sat, 30 Jun 2007 16:41:42 +0200 (MEST) X-Authentication-Warning: neerbosch.nijmegen.internl.net: mboland owned process doing -bs Date: Sat, 30 Jun 2007 16:41:42 +0200 (MEST) From: Michiel Boland To: freebsd-current@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: tcsh hangs in sigsuspend X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2007 14:41:43 -0000 Hi. I can no longer do simple things like kill `cat pidfile` in tcsh. After some debugging I noticed that tcsh hangs in sigsuspend in line 512 of sh.proc.c. So I guess it (tcsh) executed 'cat pidfile', and now waits for the process to terminate. But unless I'm not looking properly, there appears to be a race condition here. Tcsh blocks the SIGCHLD signal *after* it forks the child, not before. So the child could wel have exited between the call to fork and the call to sigprocmask. In that case, would not the sigsuspend hang forever? Also, I noticed that gdb gets very confused if I try to debug tcsh with a backticked command like the one above. (I guess this is the same as bin/112408) Cheers Michiel