From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Gregory Marton Newsgroups: gmane.lisp.guile.bugs Subject: signal handling different in 1.8.3 than 1.8.1? Date: Sun, 1 Jun 2008 15:35:40 -0400 (EDT) Message-ID: Reply-To: Gregory Marton NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Trace: ger.gmane.org 1212348976 28795 80.91.229.12 (1 Jun 2008 19:36:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Jun 2008 19:36:16 +0000 (UTC) To: bug-guile@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sun Jun 01 21:36:58 2008 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K2tMG-00075r-56 for guile-bugs@m.gmane.org; Sun, 01 Jun 2008 21:36:48 +0200 Original-Received: from localhost ([127.0.0.1]:33793 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K2tLU-0003fy-48 for guile-bugs@m.gmane.org; Sun, 01 Jun 2008 15:36:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K2tLD-0003Yh-8r for bug-guile@gnu.org; Sun, 01 Jun 2008 15:35:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K2tLB-0003Wz-RF for bug-guile@gnu.org; Sun, 01 Jun 2008 15:35:42 -0400 Original-Received: from [199.232.76.173] (port=46022 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K2tLB-0003Wr-GT for bug-guile@gnu.org; Sun, 01 Jun 2008 15:35:41 -0400 Original-Received: from outgoing.csail.mit.edu ([128.30.2.149]:52394) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K2tLB-0003xe-45 for bug-guile@gnu.org; Sun, 01 Jun 2008 15:35:41 -0400 Original-Received: from fiji.csail.mit.edu ([128.30.44.35]) by outgoing.csail.mit.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1K2tLA-0008Bu-Sm for bug-guile@gnu.org; Sun, 01 Jun 2008 15:35:40 -0400 Original-Received: from gremio (helo=localhost) by fiji.csail.mit.edu with local-esmtp (Exim 4.63) (envelope-from ) id 1K2tLA-0001dR-L3 for bug-guile@gnu.org; Sun, 01 Jun 2008 15:35:40 -0400 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:3886 Archived-At: Hi folks, Now that I've upgraded to 1.8.3 from 1.8.1, some old test cases are failing. In particular: (define (ensure body-lambda ensuring-lambda) (dynamic-wind (lambda () #t) body-lambda ensuring-lambda)) (define (with-sigaction signum handler flags lamb) (let ((old-sigaction (sigaction signum))) (if flags (sigaction signum handler flags) (sigaction signum handler)) (ensure lamb (lambda () (sigaction signum (car old-sigaction) (cdr old-sigaction)))))) ;; imagine an appropriate (assert bool message) and (assert-equal a b msg) (let ((orig (sigaction SIGALRM)) (sigcalled #f)) (with-sigaction SIGALRM (lambda (sig) (set! sigcalled #t)) #f (lambda () (raise SIGALRM))) (assert sigcalled "we set and handled an alarm")) ;; FAILS in 1.8.3 (assert-equal orig (sigaction SIGALRM) "returned to the original state") (let ((outer "nop") (inner "nop")) (with-sigaction SIGALRM (lambda (sig) (set! outer "outer")) #f (lambda () (with-sigaction SIGALRM (lambda (sig) (set! inner "inner")) #f (lambda () (raise SIGALRM))) (raise SIGALRM))) (and (assert-equal "inner" inner "inner sig got handled") ;; FAILS (assert-equal "outer" outer "outer sig got handled"))) (assert-equal orig (sigaction SIGALRM) "returned to the original state") All of these passed in 1.8.1. If this is no longer The Recommended Way, how would one go about it? Many thanks, Grem -- ------ __@ Gregory A. Marton http://csail.mit.edu/~gremio/ --- _`\<,_ . -- (*)/ (*) Lots of Insidious Silly Parentheses (LISP :-) ~~~~~~~~~~~~~~~~-~~~~~~~~_~~~_~~~~~v~~~~^^^^~~~~~--~~~~~~~~~~~~~~~++~~~~~~~