I want to clone the complete current running newLisp program to a new instance. I use this trick:
Code: Select all
(process (append (first (main-args)) " " (last (main-args))))
Code: Select all
peter@Starcrater:~$ newlisp
newLISP v.8.2.5 Copyright (c) 2004 Lutz Mueller. All rights reserved.
> (process "newlisp")
1365
> newLISP v.8.2.5 Copyright (c) 2004 Lutz Mueller. All rights reserved.
>
Code: Select all
peter 1364 1138 0 23:09 pts/1 00:00:00 newlisp
peter 1365 1364 0 23:09 pts/1 00:00:00 newlisp
peter 1366 1365 0 23:09 pts/1 00:00:00 newlisp
When I exit the spawned newLisp, I arrive at the Unix prompt immediately, with 2 remaining newLisp processes in memory, which must be killed manually.
Peter