diff options
author | Noam Postavsky <npostavs@gmail.com> | 2019-06-25 22:04:13 -0400 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2019-06-25 22:04:13 -0400 |
commit | 9552ee4df7d2ceebb8728a61d00598aa981b580c (patch) | |
tree | 5bd393a52f3f1b0510ff77fb2bd38e4a2c00ad8c /src/sysdep.c | |
parent | c7a59d87b5726725cffa51a1f432f0961548dbe3 (diff) | |
parent | e62ad04963982ea9cc7622b32484778845bc2ec1 (diff) | |
download | emacs-9552ee4df7d2ceebb8728a61d00598aa981b580c.tar.gz emacs-9552ee4df7d2ceebb8728a61d00598aa981b580c.tar.bz2 emacs-9552ee4df7d2ceebb8728a61d00598aa981b580c.zip |
Merge from emacs-26
e62ad04963 Fix sgml-mode handling of quotes within parens (Bug#36347)
06b35b2f92 ; * lisp/frame.el: Enhance add-variable-watcher commentary.
572e34bb6f Rename 'make-symbolic-link' argument NEWNAME to LINKNAME
04477adedc Check that length of data returned by sysctl is non-zero
81535eeadb * test/lisp/progmodes/python-tests.el (python-virt-bin): D...
9d48979ca8 Fix Python tests depending on system-type
fcf6cc3177 Fix problem with wdired test when symlinks cannot be created.
4701e0663e Improve wording of documentation of click events
# Conflicts:
# lisp/textmodes/sgml-mode.el
# test/lisp/textmodes/sgml-mode-tests.el
Diffstat (limited to 'src/sysdep.c')
-rw-r--r-- | src/sysdep.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index f7fc99f147f..4f89e8aba10 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -3018,11 +3018,11 @@ list_system_processes (void) Lisp_Object proclist = Qnil; - if (sysctl (mib, 3, NULL, &len, NULL, 0) != 0) + if (sysctl (mib, 3, NULL, &len, NULL, 0) != 0 || len == 0) return proclist; procs = xmalloc (len); - if (sysctl (mib, 3, procs, &len, NULL, 0) != 0) + if (sysctl (mib, 3, procs, &len, NULL, 0) != 0 || len == 0) { xfree (procs); return proclist; @@ -3616,7 +3616,7 @@ system_process_attributes (Lisp_Object pid) CONS_TO_INTEGER (pid, int, proc_id); mib[3] = proc_id; - if (sysctl (mib, 4, &proc, &proclen, NULL, 0) != 0) + if (sysctl (mib, 4, &proc, &proclen, NULL, 0) != 0 || proclen == 0) return attrs; attrs = Fcons (Fcons (Qeuid, INT_TO_INTEGER (proc.ki_uid)), attrs); @@ -3739,7 +3739,7 @@ system_process_attributes (Lisp_Object pid) mib[2] = KERN_PROC_ARGS; len = MAXPATHLEN; - if (sysctl (mib, 4, args, &len, NULL, 0) == 0) + if (sysctl (mib, 4, args, &len, NULL, 0) == 0 && len != 0) { int i; for (i = 0; i < len; i++) @@ -3785,7 +3785,7 @@ system_process_attributes (Lisp_Object pid) CONS_TO_INTEGER (pid, int, proc_id); mib[3] = proc_id; - if (sysctl (mib, 4, &proc, &proclen, NULL, 0) != 0) + if (sysctl (mib, 4, &proc, &proclen, NULL, 0) != 0 || proclen == 0) return attrs; uid = proc.kp_eproc.e_ucred.cr_uid; |