gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Gcl-devel] Re: system, load-time-value


From: Mike Thomas
Subject: RE: [Gcl-devel] Re: system, load-time-value
Date: Mon, 16 Feb 2004 15:27:14 +1000

Hi there.

Camm writes:

| Debian User <address@hidden> writes:
|
| >     This should be documented, and reworked to be more user
| >     friendly IMHO.  But basically you get the high and low
| >     order short integers of the return code.  If on linux,
| >     do a 'man system' and 'man 2 wait' and you can see that
| >     bits of information regarding which process failed and
| >     why are encoded in a special manner in this field.
| >     We should probably unpack this at some point and be
| >     more verbose.  In short, 0 0 is success.
| >
| > Thanks for the references!  I took a single look, and found out:
| >
| > >(si::system "exit 3")
| >
| > 3
| > 0
| >
| > >(si::sytem "kill -15 $$")
| >
| > 0
| > 15
| >
|
| Thanks for this observation!  We should add this to the docs.  I
| wonder how portable this is across windows, macosx, etc.

The practical semantics of "system()" are different for Windows at least to
the extent that on Unix "system()" runs its argument in a Unix shell,
whereas on Windows it runs in a command interpreter which varies in it's
abilities across versions of Windows (as, I suppose, shells on Unix).

As it happens, on Win XP the command interpreter happens to know the exit
command and the first example thankfully works the same way:

===========================
>(si::system "exit 3")

0
3
===========================

For more information on the Windows C runtime system() call see:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/
vclrfAlphabeticalFunctionReference.asp


| OK, this is an official call for suggestions -- which of our packages
| should be used by user?  Currently we have:
| (
| list-all-packages)
|
| (#<"CONDITIONS" package> #<"SLOT-ACCESSOR-NAME" package>
|  #<"PCL" package> #<"ITERATE" package> #<"WALKER" package>
|  #<"TK" package> #<"DEFPACKAGE" package> #<"ANSI-LOOP" package>
|  #<"SERROR" package> #<"SLOOP" package> #<"COMPILER" package>
|  #<"SYSTEM" package> #<"KEYWORD" package> #<"COMMON-LISP" package>
|  #<"COMMON-LISP-USER" package> #<"LISP" package>)
|
| This is a 2.7.x item.

I suppose that we should really look at what is most compatible with the
other major CL compilers to ease porting including, perhaps, aliases of
other compilers' package names where compatibility of exported symbols is
substantial.

For back compatibility with AKCL and/or CLTL1 perhaps we could have separate
packages for each.

To avoid exporting extraneous symbols, we should make sure that no support
functions are exported from those packages.

Other than that I have no preferences.

Cheers

Mike Thomas.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]