# HG changeset patch # User Richard M. Stallman # Date 757246126 0 # Node ID a70b89d2d6bb3080a83314a931a6141a4de9e92b # Parent ac927443eae94b1cddafbc724d86016e0b5c2cf1 (Femacs_pid): New function. (syms_of_editfns): Define it for Lisp. diff -r ac927443eae9 -r a70b89d2d6bb src/editfns.c --- a/src/editfns.c Thu Dec 30 10:06:31 1993 +0000 +++ b/src/editfns.c Thu Dec 30 10:08:46 1993 +0000 @@ -527,6 +527,13 @@ return Vsystem_name; } +DEFUN ("emacs-pid", Femacs_pid, Semacs_pid, 0, 0, 0, + "Return the process ID of Emacs, as an integer.") + () +{ + return make_number (getpid ()); +} + DEFUN ("current-time", Fcurrent_time, Scurrent_time, 0, 0, 0, "Return the current time, as the number of seconds since 12:00 AM January 1970.\n\ The time is returned as a list of three integers. The first has the\n\ @@ -1628,6 +1635,7 @@ defsubr (&Suser_uid); defsubr (&Suser_real_uid); defsubr (&Suser_full_name); + defsubr (&Semacs_pid); defsubr (&Scurrent_time); defsubr (&Scurrent_time_string); defsubr (&Scurrent_time_zone);