From: ········@gmail.com
Subject: packages that support fork, kill, etc
Date: 
Message-ID: <1179355267.318573.183280@l77g2000hsb.googlegroups.com>
Hi,

I'm pretty new to lisp.  I'm trying to implement a timeout mentioned
here http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/f2f13557b5a19d73/fdf603730390c5c0?lnk=gst&q=timeout+clisp&rnum=2#

I just installed clisp 2.41, but for some reason the LINUX package is
not there.  I checked by doing a (list-all-packages)  I tried
searching for the fork symbol by doing:

(find-all-symbols "fork")

but it returned nil.

My question is how would I either get the LINUX package or some other
package that supports those system calls I need.  Or if there is a way
to do those calls without installing extra packages.

Any help would be appreciated.

Thanks,

Kanit

From: Pascal Bourguignon
Subject: Re: packages that support fork, kill, etc
Date: 
Message-ID: <87abw4pd7b.fsf@thalassa.lan.informatimago.com>
········@gmail.com writes:

> Hi,
>
> I'm pretty new to lisp.  I'm trying to implement a timeout mentioned
> here http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/f2f13557b5a19d73/fdf603730390c5c0?lnk=gst&q=timeout+clisp&rnum=2#
>
> I just installed clisp 2.41, but for some reason the LINUX package is
> not there.  I checked by doing a (list-all-packages)  I tried
> searching for the fork symbol by doing:
>
> (find-all-symbols "fork")
>
> but it returned nil.
>
> My question is how would I either get the LINUX package or some other
> package that supports those system calls I need.  Or if there is a way
> to do those calls without installing extra packages.

There is an option when compiling CLISP on LINUX to have a LINUX
package exporting glibc bindings.

Try: ./configure --with-module=bindings/glibc


Unfortunately, this package is not available on other unix systems
(even when they use glibc), or on other posix systems.  But in these
cases, you should be able to easily access the OS layer using the FFI.



Here is a with-timeout using alarm(2) instead of fork(2)+sleep(2)+kill(2):

http://groups.google.com/group/comp.lang.lisp/browse_frm/thread/d673f1c638581681/d6cc4ef5d5c8b26c?lnk=st&q=clisp+timeout+group%3Acomp.lang.lisp+author%3APascal%2BBourguignon&rnum=2#d6cc4ef5d5c8b26c


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

NOTE: The most fundamental particles in this product are held
together by a "gluing" force about which little is currently known
and whose adhesive power can therefore not be permanently
guaranteed.
From: ········@gmail.com
Subject: Re: packages that support fork, kill, etc
Date: 
Message-ID: <1179442080.326016.250720@h2g2000hsg.googlegroups.com>
I tried compiling with the flag you suggested, but still no luck.  The
file bindings/glibc does it exist and it appears to have installed
with the option ok.  Could it be the version I downloaded?  I
downloaded it from ftp://ftp.gnu.org/pub/gnu/clisp/release/2.41

Thanks,

Kanit

On May 16, 4:21 pm, Pascal Bourguignon <····@informatimago.com> wrote:
> ········@gmail.com writes:
> > Hi,
>
> > I'm pretty new to lisp.  I'm trying to implement a timeout mentioned
> > herehttp://groups.google.com/group/comp.lang.lisp/browse_thread/thread/f2...
>
> > I just installed clisp 2.41, but for some reason the LINUX package is
> > not there.  I checked by doing a (list-all-packages)  I tried
> > searching for the fork symbol by doing:
>
> > (find-all-symbols "fork")
>
> > but it returned nil.
>
> > My question is how would I either get the LINUX package or some other
> > package that supports those system calls I need.  Or if there is a way
> > to do those calls without installing extra packages.
>
> There is an option when compiling CLISP on LINUX to have a LINUX
> package exporting glibc bindings.
>
> Try: ./configure --with-module=bindings/glibc
>
> Unfortunately, this package is not available on other unix systems
> (even when they use glibc), or on other posix systems.  But in these
> cases, you should be able to easily access the OS layer using the FFI.
>
> Here is a with-timeout using alarm(2) instead of fork(2)+sleep(2)+kill(2):
>
> http://groups.google.com/group/comp.lang.lisp/browse_frm/thread/d673f...
>
> --
> __Pascal Bourguignon__                    http://www.informatimago.com/
>
> NOTE: The most fundamental particles in this product are held
> together by a "gluing" force about which little is currently known
> and whose adhesive power can therefore not be permanently
> guaranteed.
From: Pascal Bourguignon
Subject: Re: packages that support fork, kill, etc
Date: 
Message-ID: <87d50yob1l.fsf@thalassa.lan.informatimago.com>
········@gmail.com writes:

> I tried compiling with the flag you suggested, but still no luck.  The
> file bindings/glibc does it exist and it appears to have installed
> with the option ok.  Could it be the version I downloaded?  I
> downloaded it from ftp://ftp.gnu.org/pub/gnu/clisp/release/2.41

What does configure say? Did it find glibc?
Are you running on Linux?
Do you launch clisp with the full linkset?

[···@thalassa common-lisp]$ clisp -norc -q -x ' (find-package "LINUX")'
NIL
[···@thalassa common-lisp]$ clisp -Kfull -norc -q -x ' (find-package "LINUX")'
#<PACKAGE LINUX>

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

NOTE: The most fundamental particles in this product are held
together by a "gluing" force about which little is currently known
and whose adhesive power can therefore not be permanently
guaranteed.
From: ········@gmail.com
Subject: Re: packages that support fork, kill, etc
Date: 
Message-ID: <1179514218.218669.221630@u30g2000hsc.googlegroups.com>
Yeah, it was the -Kfull flag that did it.  It works now. Thanks!

On May 18, 12:17 am, Pascal Bourguignon <····@informatimago.com>
wrote:
> ········@gmail.com writes:
> > I tried compiling with the flag you suggested, but still no luck.  The
> > file bindings/glibc does it exist and it appears to have installed
> > with the option ok.  Could it be the version I downloaded?  I
> > downloaded it fromftp://ftp.gnu.org/pub/gnu/clisp/release/2.41
>
> What does configure say? Did it find glibc?
> Are you running on Linux?
> Do you launch clisp with the full linkset?
>
> [···@thalassa common-lisp]$ clisp -norc -q -x ' (find-package "LINUX")'
> NIL
> [···@thalassa common-lisp]$ clisp -Kfull -norc -q -x ' (find-package "LINUX")'
> #<PACKAGE LINUX>
>
> --
> __Pascal Bourguignon__                    http://www.informatimago.com/
>
> NOTE: The most fundamental particles in this product are held
> together by a "gluing" force about which little is currently known
> and whose adhesive power can therefore not be permanently
> guaranteed.