From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Emsley Newsgroups: gmane.lisp.guile.user Subject: execlp Date: Tue, 22 Nov 2011 16:06:22 +0000 Message-ID: <4ECBC87E.7090000@bioch.ox.ac.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1321978313 19875 80.91.229.12 (22 Nov 2011 16:11:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 22 Nov 2011 16:11:53 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Nov 22 17:11:46 2011 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RSswk-0008Pk-2H for guile-user@m.gmane.org; Tue, 22 Nov 2011 17:11:46 +0100 Original-Received: from localhost ([::1]:53033 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSswi-0005P6-5G for guile-user@m.gmane.org; Tue, 22 Nov 2011 11:11:44 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:46641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSswe-0005Nt-6l for guile-user@gnu.org; Tue, 22 Nov 2011 11:11:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RSswY-0007lB-M8 for guile-user@gnu.org; Tue, 22 Nov 2011 11:11:40 -0500 Original-Received: from relay9.mail.ox.ac.uk ([163.1.2.169]:33138) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSsrY-0006QR-SP for guile-user@gnu.org; Tue, 22 Nov 2011 11:06:24 -0500 Original-Received: from smtp1.mail.ox.ac.uk ([129.67.1.207]) by relay9.mail.ox.ac.uk with esmtp (Exim 4.75) (envelope-from ) id 1RSsrW-00033w-UX for guile-user@gnu.org; Tue, 22 Nov 2011 16:06:22 +0000 Original-Received: from marmoset.bioch.ox.ac.uk ([129.67.79.10]) by smtp1.mail.ox.ac.uk with esmtp (Exim 4.69) (envelope-from ) id 1RSsrW-0008OC-4G for guile-user@gnu.org; Tue, 22 Nov 2011 16:06:22 +0000 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110621 Fedora/3.1.11-1.fc14 Lightning/1.0b2 Thunderbird/3.1.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 163.1.2.169 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:8969 Archived-At: Hi, I am trying to see if there is a way to determine if a program is in the path (i.e. a bit like "which"), returning a #t or #f answer. I was looking execl and execlp. The documentation for execl says: > Executes the file named by path as a new process image what is path ? I'm guessing that that should be "filename". While playing around, I notice that (execlp "ls") produces a core dump. My question is then, *is* there a way to determine if a string is executable? (And if so, how? :-) Thanks, Paul.