diff options
| author | Eli Zaretskii | 2009-01-03 15:03:59 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2009-01-03 15:03:59 +0000 |
| commit | 6a1bab0e5cab4d47b3a93bb769acfbdc6a40e13f (patch) | |
| tree | 051c649ae00ef912fbf1da56926443df4c9bfe80 /src | |
| parent | e5c9f94c66a899121a3c665f9c312fb09370e9e9 (diff) | |
| download | emacs-6a1bab0e5cab4d47b3a93bb769acfbdc6a40e13f.tar.gz emacs-6a1bab0e5cab4d47b3a93bb769acfbdc6a40e13f.zip | |
(Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess)
(Qttname, Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime)
(Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs)
(Quser, Qgroup, Qetime, Qpcpu, Qpmem, Qtpgid, Qcstime) [!subprocesses]: Define.
(syms_of_process) [!subprocesses]: Intern and staticpro them.
(Flist_system_processes, Fsystem_process_attributes) [!subprocesses]: Call
list_system_processes and system_process_attributes instead of returning Qnil.
Diffstat (limited to 'src')
| -rw-r--r-- | src/process.c | 77 |
1 files changed, 74 insertions, 3 deletions
diff --git a/src/process.c b/src/process.c index abe5b95905f..b3271d3a2e9 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Asynchronous subprocess control for GNU Emacs. | 1 | /* Asynchronous subprocess control for GNU Emacs. |
| 2 | Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, | 2 | Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, |
| 3 | 1996, 1998, 1999, 2001, 2002, 2003, 2004, | 3 | 1996, 1998, 1999, 2001, 2002, 2003, 2004, |
| 4 | 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | 4 | 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 7 | 7 | ||
| @@ -7541,6 +7541,11 @@ extern int timers_run; | |||
| 7541 | 7541 | ||
| 7542 | Lisp_Object QCtype, QCname; | 7542 | Lisp_Object QCtype, QCname; |
| 7543 | 7543 | ||
| 7544 | Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname, Qtpgid; | ||
| 7545 | Lisp_Object Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime, Qcstime; | ||
| 7546 | Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs; | ||
| 7547 | Lisp_Object Quser, Qgroup, Qetime, Qpcpu, Qpmem, Qtime, Qctime; | ||
| 7548 | |||
| 7544 | /* As described above, except assuming that there are no subprocesses: | 7549 | /* As described above, except assuming that there are no subprocesses: |
| 7545 | 7550 | ||
| 7546 | Wait for timeout to elapse and/or keyboard input to be available. | 7551 | Wait for timeout to elapse and/or keyboard input to be available. |
| @@ -7810,7 +7815,7 @@ See `system-process-attributes' for getting attributes of a process | |||
| 7810 | given its ID. */) | 7815 | given its ID. */) |
| 7811 | () | 7816 | () |
| 7812 | { | 7817 | { |
| 7813 | return Qnil; | 7818 | return list_system_processes (); |
| 7814 | } | 7819 | } |
| 7815 | 7820 | ||
| 7816 | DEFUN ("system-process-attributes", Fsystem_process_attributes, | 7821 | DEFUN ("system-process-attributes", Fsystem_process_attributes, |
| @@ -7868,7 +7873,7 @@ integer or floating point values. | |||
| 7868 | 7873 | ||
| 7869 | Lisp_Object pid; | 7874 | Lisp_Object pid; |
| 7870 | { | 7875 | { |
| 7871 | return Qnil; | 7876 | return system_process_attributes (pid); |
| 7872 | } | 7877 | } |
| 7873 | 7878 | ||
| 7874 | void | 7879 | void |
| @@ -7883,6 +7888,72 @@ syms_of_process () | |||
| 7883 | staticpro (&QCtype); | 7888 | staticpro (&QCtype); |
| 7884 | QCname = intern (":name"); | 7889 | QCname = intern (":name"); |
| 7885 | staticpro (&QCname); | 7890 | staticpro (&QCname); |
| 7891 | QCtype = intern (":type"); | ||
| 7892 | staticpro (&QCtype); | ||
| 7893 | QCname = intern (":name"); | ||
| 7894 | staticpro (&QCname); | ||
| 7895 | Qeuid = intern ("euid"); | ||
| 7896 | staticpro (&Qeuid); | ||
| 7897 | Qegid = intern ("egid"); | ||
| 7898 | staticpro (&Qegid); | ||
| 7899 | Quser = intern ("user"); | ||
| 7900 | staticpro (&Quser); | ||
| 7901 | Qgroup = intern ("group"); | ||
| 7902 | staticpro (&Qgroup); | ||
| 7903 | Qcomm = intern ("comm"); | ||
| 7904 | staticpro (&Qcomm); | ||
| 7905 | Qstate = intern ("state"); | ||
| 7906 | staticpro (&Qstate); | ||
| 7907 | Qppid = intern ("ppid"); | ||
| 7908 | staticpro (&Qppid); | ||
| 7909 | Qpgrp = intern ("pgrp"); | ||
| 7910 | staticpro (&Qpgrp); | ||
| 7911 | Qsess = intern ("sess"); | ||
| 7912 | staticpro (&Qsess); | ||
| 7913 | Qttname = intern ("ttname"); | ||
| 7914 | staticpro (&Qttname); | ||
| 7915 | Qtpgid = intern ("tpgid"); | ||
| 7916 | staticpro (&Qtpgid); | ||
| 7917 | Qminflt = intern ("minflt"); | ||
| 7918 | staticpro (&Qminflt); | ||
| 7919 | Qmajflt = intern ("majflt"); | ||
| 7920 | staticpro (&Qmajflt); | ||
| 7921 | Qcminflt = intern ("cminflt"); | ||
| 7922 | staticpro (&Qcminflt); | ||
| 7923 | Qcmajflt = intern ("cmajflt"); | ||
| 7924 | staticpro (&Qcmajflt); | ||
| 7925 | Qutime = intern ("utime"); | ||
| 7926 | staticpro (&Qutime); | ||
| 7927 | Qstime = intern ("stime"); | ||
| 7928 | staticpro (&Qstime); | ||
| 7929 | Qtime = intern ("time"); | ||
| 7930 | staticpro (&Qtime); | ||
| 7931 | Qcutime = intern ("cutime"); | ||
| 7932 | staticpro (&Qcutime); | ||
| 7933 | Qcstime = intern ("cstime"); | ||
| 7934 | staticpro (&Qcstime); | ||
| 7935 | Qctime = intern ("ctime"); | ||
| 7936 | staticpro (&Qctime); | ||
| 7937 | Qpri = intern ("pri"); | ||
| 7938 | staticpro (&Qpri); | ||
| 7939 | Qnice = intern ("nice"); | ||
| 7940 | staticpro (&Qnice); | ||
| 7941 | Qthcount = intern ("thcount"); | ||
| 7942 | staticpro (&Qthcount); | ||
| 7943 | Qstart = intern ("start"); | ||
| 7944 | staticpro (&Qstart); | ||
| 7945 | Qvsize = intern ("vsize"); | ||
| 7946 | staticpro (&Qvsize); | ||
| 7947 | Qrss = intern ("rss"); | ||
| 7948 | staticpro (&Qrss); | ||
| 7949 | Qetime = intern ("etime"); | ||
| 7950 | staticpro (&Qetime); | ||
| 7951 | Qpcpu = intern ("pcpu"); | ||
| 7952 | staticpro (&Qpcpu); | ||
| 7953 | Qpmem = intern ("pmem"); | ||
| 7954 | staticpro (&Qpmem); | ||
| 7955 | Qargs = intern ("args"); | ||
| 7956 | staticpro (&Qargs); | ||
| 7886 | 7957 | ||
| 7887 | defsubr (&Sget_buffer_process); | 7958 | defsubr (&Sget_buffer_process); |
| 7888 | defsubr (&Sprocess_inherit_coding_system_flag); | 7959 | defsubr (&Sprocess_inherit_coding_system_flag); |