From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Greg Troxel Newsgroups: gmane.lisp.guile.devel Subject: Re: Support for (system '("echo" "foo" "bar")) Date: 29 Oct 2003 08:58:02 -0500 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: References: <87ad7l9i8h.fsf@raven.i.defaultvalue.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1067436054 4234 80.91.224.253 (29 Oct 2003 14:00:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 29 Oct 2003 14:00:54 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Oct 29 15:00:51 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AEqsV-0005nc-00 for ; Wed, 29 Oct 2003 15:00:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AEqsK-00052S-BJ for guile-devel@m.gmane.org; Wed, 29 Oct 2003 09:00:40 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AEqrn-00050m-PB for guile-devel@gnu.org; Wed, 29 Oct 2003 09:00:07 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AEqrG-0004qA-G9 for guile-devel@gnu.org; Wed, 29 Oct 2003 09:00:05 -0500 Original-Received: from [192.1.100.210] (helo=fnord.ir.bbn.com) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AEqpn-0004QT-7b for guile-devel@gnu.org; Wed, 29 Oct 2003 08:58:03 -0500 Original-Received: by fnord.ir.bbn.com (Postfix, from userid 10853) id 2AFB522FA; Wed, 29 Oct 2003 08:58:02 -0500 (EST) Original-To: Rob Browning In-Reply-To: <87ad7l9i8h.fsf@raven.i.defaultvalue.org> Original-Lines: 30 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2929 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2929 This violates the Principle of Least Astonishment. In guile we have a lot of procedures that are essentially just the 'obvious' scheme-wrapped versions of system calls and libc functions. system(3) (on NetBSD, which claimes conformance with ANSI X3.159-1989 (``ANSI C'') and IEEE Std 1003.2-1992 (``POSIX.2'')), is specified to use sh(1). POLA to me says that system with a list of strings would append them with spaces and then behave as if it had been called with that single string. This means /bin/sh, with globbing, file redirection, and multiple commands, not the simpler exec treatment. That said, a procedure to encapsulate the safer fork/exec/wait process would be very nice. So IMHO another name is warranted, and system* as already suggested seems good, since it hints that it isn't really system(3), but something else that is similar. Also, it might be nice to have environments with system* but not system (as a kind of 'safe environment'). A good case can be made that system(3) should not be used, except perhaps with constant strings - certainly not with unchecked user input. Is it important/useful to you to have the extended functionality have the same name? -- Greg Troxel _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel