[Bug-openmcl] more bugs in openmcl

Faré fahree at gmail.com
Mon Oct 8 14:06:32 MDT 2007


Dear bug-openmcl'ers,

I am using openmcl on Linux x86-64, duplicating a CVS checkout from Gary Palter.

In an attempt to port POIU to openmcl (a parallel variant of ASDF), I
have found myself incapable of fork()ing in openmcl. When I (apropos
"FORK"), I can see nothing, yet when I grep for fork, I find
library/x8664-linux-syscalls.lisp:(define-syscall (logior
platform-os-linux platform-cpu-x86 platform-word-size-64)
syscalls::fork 57 () :signed-fullword)
I tried to replicate that line at the top-level, to no avail: when I try to
(in-package "CCL")
(eval-when (:compile-toplevel :load-toplevel :execute)
  (require "SYSCALL"))
(define-syscall (logior platform-os-linux platform-cpu-x86
platform-word-size-64)  syscalls::fork 57 () :signed-fullword)
(ccl::syscall syscalls::fork)
I get
> Error: Undefined function %SYSCALL called with arguments (57 :SIGNED-FULLWORD) .

I must be doing something wrong, but I don't know what.

Also, I know that SBCL hates it if you fork while multiple threads are
running, as it confuses the internal thread management in the forked
process. On SBCL, the workaround is to only use fork from a
single-threaded SBCL (i.e. before any thread is spawned from the
initial top-level). Is there any similar issue with OpenMCL, and what
would a solution (or workaround) be?

Note that this issue is not one of using fork followed by exec. When
you fork then in the child you exec before you had the opportunity to
mess with the Lisp and/or C threading runtime support, then you
needn't fear anything. But in this particular case, I really do not
want to exec, just to fork and then call COMPILE-FILE in the child.

[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ]
God is omnipotent, omniscient and omnibenevolent -- it says so right here on
the label. If you have a mind capable of believing all three of these divine
attributes simultaneously, I have a wonderful bargain for you. No checks,
please. Cash and in small bills.
        -- Robert Heinlein, "Time Enough For Love"



More information about the Bug-openmcl mailing list