[Openmcl-devel] where is shell output stored when launching an external program?

Pascal J. Bourguignon pjb at informatimago.com
Tue Apr 17 15:30:41 PDT 2012

Mark Cox <markcox80 at gmail.com> writes:

> Hi Clayton,
> On Tue, Apr 17, 2012 at 11:00 AM, clayton stanley
> <cstanley at cstanley.no-ip.biz> wrote:
>> I am launching external processes with clozure common lisp. For better feedback/debugging, I would like to display the bash error string when I try to execute a nonexistent binary.
> Can't this be solved using PROBE-FILE?

In general, no.

One of the principles of unix programming (and perhaps even of
programming on all OS, even if they try to provide more sophisticated
mechanisms, the success of unix would be proof of its superiority in
this matter, perhaps), is that you just try to do the thing you want to
do, and get an error if there's a problem.

The reason why it's not a good idea to test before, is that between that
test, and the actual action, things may change (this is a multi-process,
multi-user OS, nowadays multi-core!).  So even if probe-file returns
true, run-program may still fail because the file may have been deleted
in between.

In practice, that may be helpful to the user.  But this just add some
complexity for no real benefit: you still have to deal with the error in

__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.

More information about the Openmcl-devel mailing list