From: Ola Rinta-Koski
Subject: CMUCL: unix-exit fails
Date: 
Message-ID: <x5bsappv2l.fsf@arenal.cyberell.com>
OK, I have a CMUCL process forked from within a C++ process. When the
CMUCL process tries to exit, I get:

Type-error in KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER:
   NIL is not of type (SIGNED-BYTE 32)


Debug  (type H for help)

(UNIX:UNIX-EXIT 1 NIL)[:EXTERNAL]
Source: Error finding source: 
Error in function DEBUG::GET-FILE-TOP-LEVEL-FORM:  Source file no longer exists:
  target:code/unix-glibc2.lisp.

Any ideas? This happens with 18c, 18d distribution binaries.
-- 
        Ola Rinta-Koski                                 ···@cyberell.com
        Cyberell Oy                                     +358 41 467 2502
        Rauhankatu 8 C, FIN-00170 Helsinki, FINLAND	www.cyberell.com

From: Harald Hanche-Olsen
Subject: Re: CMUCL: unix-exit fails
Date: 
Message-ID: <pco3cw15v33.fsf@thoth.math.ntnu.no>
+ Ola Rinta-Koski <···@cyberell.com>:

| OK, I have a CMUCL process forked from within a C++ process. When the
| CMUCL process tries to exit, I get:
| 
| Type-error in KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER:
|    NIL is not of type (SIGNED-BYTE 32)
| 
| Debug  (type H for help)
| 
| (UNIX:UNIX-EXIT 1 NIL)[:EXTERNAL]

Well, to me it looks like you're trying to execute

  (unix:unix-exit nil)

which is not right.  Try (describe 'unix:unix-exit).

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- Yes it works in practice - but does it work in theory?
From: Gabe Garza
Subject: Re: CMUCL: unix-exit fails
Date: 
Message-ID: <d6v5hz5h.fsf@anubis.kynopolis.org.kynopolis.org>
Ola Rinta-Koski <···@cyberell.com> writes:

> OK, I have a CMUCL process forked from within a C++ process. When the
> CMUCL process tries to exit, I get:
> 
> Type-error in KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER:
>    NIL is not of type (SIGNED-BYTE 32)
> 
> 
> Debug  (type H for help)
> 
> (UNIX:UNIX-EXIT 1 NIL)[:EXTERNAL]
> Source: Error finding source: 
> Error in function DEBUG::GET-FILE-TOP-LEVEL-FORM:  Source file no longer exists:
>   target:code/unix-glibc2.lisp.
> 
> Any ideas? This happens with 18c, 18d distribution binaries.

Yes.  You're calling UNIX:UNIX-EXIT with a single argument whose value
is NIL.  Try passing an argument whose value is (UNSIGNED-BYTE 8). I
*think* that 1 byte is fairly standard for unix exit statuses--I'd be
interested in a correction if I'm wrong...

Gabe Garza
From: Ola Rinta-Koski
Subject: Re: CMUCL: unix-exit fails
Date: 
Message-ID: <28f2aadb.0206090247.23dbd799@posting.google.com>
Gabe Garza <·······@ix.netcom.com> wrote in message news:<············@anubis.kynopolis.org.kynopolis.org>...
> Ola Rinta-Koski <···@cyberell.com> writes:
> 
> > OK, I have a CMUCL process forked from within a C++ process. When the
> > CMUCL process tries to exit, I get:
> > 
> > Type-error in KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER:
> >    NIL is not of type (SIGNED-BYTE 32)
> > 
> > 
> > Debug  (type H for help)
> > 
> > (UNIX:UNIX-EXIT 1 NIL)[:EXTERNAL]
> > Source: Error finding source: 
> > Error in function DEBUG::GET-FILE-TOP-LEVEL-FORM:  Source file no longer exists:
> >   target:code/unix-glibc2.lisp.
> > 
> > Any ideas? This happens with 18c, 18d distribution binaries.
> 
> Yes.  You're calling UNIX:UNIX-EXIT with a single argument whose value
> is NIL.  Try passing an argument whose value is (UNSIGNED-BYTE 8). I
> *think* that 1 byte is fairly standard for unix exit statuses--I'd be
> interested in a correction if I'm wrong...

I am not calling UNIX:UNIX-EXIT at all. I have created an image with
EXT:SAVE-LISP and apparently UNIX:UNIX-EXIT gets called when the start
function exits - but for some reason with wrong arguments.

Come to think of it, I could probably circumvent this by calling
UNIX:UNIX-EXIT explicitly. Still, I think it's a CMUCL bug.
From: Conrad Scott
Subject: Re: CMUCL: unix-exit fails
Date: 
Message-ID: <3d0339f3$0$225$cc9e4d1f@news.dial.pipex.com>
"Ola Rinta-Koski" <···@cyberell.com> wrote in message
·································@posting.google.com...
> I am not calling UNIX:UNIX-EXIT at all. I have created an image with
> EXT:SAVE-LISP and apparently UNIX:UNIX-EXIT gets called when the
> start function exits - but for some reason with wrong arguments.
>
> Come to think of it, I could probably circumvent this by calling
> UNIX:UNIX-EXIT explicitly. Still, I think it's a CMUCL bug.

I've never used CMUCL but, if it is arranged as most Unix systems are, the
return value of the start function is probably used as the argument to
exit(). So, does your start function yield a NIL? and what happens if it
yields something else?

Just an idea in case it helps,
// Conrad
From: Ola Rinta-Koski
Subject: Re: CMUCL: unix-exit fails
Date: 
Message-ID: <28f2aadb.0206101000.3db79c41@posting.google.com>
"Conrad Scott" <············@hotmail.com> wrote in message news:<·······················@news.dial.pipex.com>...
> I've never used CMUCL but, if it is arranged as most Unix systems are, the
> return value of the start function is probably used as the argument to
> exit(). So, does your start function yield a NIL? and what happens if it
> yields something else?

You're absolutely right Conrad, the start function returns NIL. I'll
fix it to return something else. Thanks.