Implement CURRENT-PID primitive for unix.
authorChris Hanson <org/chris-hanson/cph>
Sat, 6 Nov 1993 21:21:12 +0000 (21:21 +0000)
committerChris Hanson <org/chris-hanson/cph>
Sat, 6 Nov 1993 21:21:12 +0000 (21:21 +0000)
v7/src/microcode/pruxenv.c

index 02660f9684670cc363a9b223c956a0b6833dae82..5daed32a971563068fa76f60b26df575c9da3ce7 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: pruxenv.c,v 1.14 1993/01/12 19:47:26 gjr Exp $
+$Id: pruxenv.c,v 1.15 1993/11/06 21:21:12 cph Exp $
 
 Copyright (c) 1990-1993 Massachusetts Institute of Technology
 
@@ -100,6 +100,13 @@ If the argument is not a known group ID, #F is returned.")
   }
 }
 \f
+DEFINE_PRIMITIVE ("CURRENT-PID", Prim_current_pid, 0, 0,
+  "Return Scheme's PID.")
+{
+  PRIMITIVE_HEADER (0);
+  PRIMITIVE_RETURN (long_to_integer (UX_getpid ()));
+}
+
 DEFINE_PRIMITIVE ("CURRENT-UID", Prim_current_uid, 0, 0,
   "Return Scheme's effective UID.")
 {