[comp.lang.smalltalk] Getting the pid/uid of st80

becher@armada.UUCP (Jonathan D. Becher) (06/02/89)

I'm basically a Smalltalk newcomer, so my apologies if this is a 
silly question:

I'm running Smalltalk-80 (ParcPlace) version 2.4 on a Sun and want to
get the pid and/or uid of the Smalltalk process.  The functionality I'm
looking for is equivalent to system calls getpid(2) and getuid(2) from 
a C program.  Is there anyway to call arbitrary C library functions?

I do know that if I create a new Unix process from Smalltalk (like a
terminal shell) that I can get its process id.  However, I'm trying to 
determine the pid of Smalltalk itself.

IN Thanks ADVANCE.

Jon Becher
argosy!becher@decwrl.dec.com

"Tie to birds together and though they have four wings they cannot fly"

khaw@pplace.COM (Mike Khaw) (06/04/89)

<112@armada.UUCP>, by becher@armada.UUCP (Jonathan D. Becher):
> I'm running Smalltalk-80 (ParcPlace) version 2.4 on a Sun and want to
> get the pid and/or uid of the Smalltalk process.  The functionality I'm
> looking for is equivalent to system calls getpid(2) and getuid(2) from 
> a C program.  Is there anyway to call arbitrary C library functions?

Smalltalk-80's "user primitive" facility allows you to call C functions
from Smalltalk.  See Chapter 12 "User-Defined Primitive Interface" in your
version 2.4 User's Guide.

I don't see any existing method in version 2.4 that gets the uid and pid
of the Smalltalk process.  

Mike Khaw, ParcPlace Technical Support
ParcPlace Systems, 1550 Plymouth St., Mountain View, CA 94043	415/691-6749
Domain=khaw@parcplace.com, UUCP={uunet,sun,decwrl}!parcplace!khaw