From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.devel Subject: scm_kill using raise Date: Sun, 17 Dec 2006 11:08:01 +1100 Message-ID: <87irgbmljy.fsf@zip.com.au> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1166314103 17563 80.91.229.10 (17 Dec 2006 00:08:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 17 Dec 2006 00:08:23 +0000 (UTC) Cc: Nils Durner Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Dec 17 01:08:21 2006 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GvjZk-0004wL-0L for guile-devel@m.gmane.org; Sun, 17 Dec 2006 01:08:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GvjZj-0001ua-Ae for guile-devel@m.gmane.org; Sat, 16 Dec 2006 19:08:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GvjZf-0001uV-4l for guile-devel@gnu.org; Sat, 16 Dec 2006 19:08:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GvjZZ-0001u3-EF for guile-devel@gnu.org; Sat, 16 Dec 2006 19:08:14 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GvjZZ-0001u0-Ao for guile-devel@gnu.org; Sat, 16 Dec 2006 19:08:09 -0500 Original-Received: from [61.8.2.231] (helo=mailout2.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GvjZY-0008Nd-SW for guile-devel@gnu.org; Sat, 16 Dec 2006 19:08:09 -0500 Original-Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id 70AD96E271; Sun, 17 Dec 2006 11:08:03 +1100 (EST) Original-Received: from localhost (ppp284A.dyn.pacific.net.au [61.8.40.74]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 2811527408; Sun, 17 Dec 2006 11:08:04 +1100 (EST) Original-Received: from gg by localhost with local (Exim 4.63) (envelope-from ) id 1GvjZS-0002Q8-Al; Sun, 17 Dec 2006 11:08:02 +1100 Original-To: guile-devel@gnu.org Mail-Copies-To: never User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:6345 Archived-At: When there's no kill() function (eg. on mingw), scm_kill will use raise() for the process itself (ie. pid==getpid()), but silently does nothing for any other pid. I think it should throw an error for that, so it doesn't look like the operation succeeded when it didn't. ENOSYS sounds right to me (and exists on mingw). An alternative would be ESRCH to claim the pid doesn't exist, but that's not really true. #define FUNC_NAME s_scm_kill { /* Signal values are interned in scm_init_posix(). */ #ifdef HAVE_KILL if (kill (scm_to_int (pid), scm_to_int (sig)) != 0) SCM_SYSERROR; #else if (scm_to_int (pid) == getpid ()) { if (raise (scm_to_int (sig)) != 0) { err: SCM_SYSERROR; } else { errno = ENOSYS; goto err; } } #endif return SCM_UNSPECIFIED; } _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel