The following patch adds SYS:GETPID which works by making the abcl wrapper shell script store the current PID as a system property.
For some reason, I see the following behaviour:
tcr@thaleron:~/src/from-upstream/abcl$ abcl-svn Armed Bear Common Lisp 0.19.0-dev Java 1.6.0_17 Sun Microsystems Inc. Java HotSpot(TM) Client VM Low-level initialization completed in 0.47 seconds. Startup completed in 1.099 seconds. Type ":help" for a list of available commands. CL-USER(1): (sys:getpid) Unable to autoload SYSTEM:GETPID tcr@thaleron:~/src/from-upstream/abcl$
I.e. the patch is not yet finished; I hope that it'll be clear what's missing to the more experienced ABCL hackers on the list.
On Windows, (SYS:GETPID) will just return NIL. There may be some way to do similiar magic with batch files, but googling didn't reveal anything promising.
-T.
On Mar 3, 2010, at 11:23 AM, Tobias C. ] wrote:
The following patch adds SYS:GETPID which works by making the abcl wrapper shell script store the current PID as a system property.
[I explained this in #abcl as well, but putting on the mailing list for posterity]
We have multiple entry points for ABCL other than the wrapper script, such as "java -jar abcl.jar", using ABCL embedded in another application, using ABCL in Google App Engine, all of which for the missing system property "pid" would be confusing. The "correct" implementation strategy is to implement the GETPID behavior that I wrote for swank-abcl.lisp as a Java primitive for ABCL. Which I take as a TODO item when I find the time.
[…]
-- "A screaming comes across the sky. It has happened before, but there is nothing to compare to it now."
armedbear-devel@common-lisp.net