aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNoam Postavsky2019-06-25 22:04:13 -0400
committerNoam Postavsky2019-06-25 22:04:13 -0400
commit9552ee4df7d2ceebb8728a61d00598aa981b580c (patch)
tree5bd393a52f3f1b0510ff77fb2bd38e4a2c00ad8c /src
parentc7a59d87b5726725cffa51a1f432f0961548dbe3 (diff)
parente62ad04963982ea9cc7622b32484778845bc2ec1 (diff)
downloademacs-9552ee4df7d2ceebb8728a61d00598aa981b580c.tar.gz
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')
-rw-r--r--src/fileio.c10
-rw-r--r--src/filelock.c2
-rw-r--r--src/sysdep.c10
3 files changed, 11 insertions, 11 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 5dd14daacb4..0da9894a73a 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2599,13 +2599,13 @@ This is what happens in interactive use with M-x. */)
2599 2599
2600DEFUN ("make-symbolic-link", Fmake_symbolic_link, Smake_symbolic_link, 2, 3, 2600DEFUN ("make-symbolic-link", Fmake_symbolic_link, Smake_symbolic_link, 2, 3,
2601 "FMake symbolic link to file: \nGMake symbolic link to file %s: \np", 2601 "FMake symbolic link to file: \nGMake symbolic link to file %s: \np",
2602 doc: /* Make a symbolic link to TARGET, named NEWNAME. 2602 doc: /* Make a symbolic link to TARGET, named LINKNAME.
2603If NEWNAME is a directory name, make a like-named symbolic link under 2603If LINKNAME is a directory name, make a like-named symbolic link under
2604NEWNAME. 2604LINKNAME.
2605 2605
2606Signal a `file-already-exists' error if a file NEWNAME already exists 2606Signal a `file-already-exists' error if a file LINKNAME already exists
2607unless optional third argument OK-IF-ALREADY-EXISTS is non-nil. 2607unless optional third argument OK-IF-ALREADY-EXISTS is non-nil.
2608An integer third arg means request confirmation if NEWNAME already 2608An integer third arg means request confirmation if LINKNAME already
2609exists, and expand leading "~" or strip leading "/:" in TARGET. 2609exists, and expand leading "~" or strip leading "/:" in TARGET.
2610This happens for interactive use with M-x. */) 2610This happens for interactive use with M-x. */)
2611 (Lisp_Object target, Lisp_Object linkname, Lisp_Object ok_if_already_exists) 2611 (Lisp_Object target, Lisp_Object linkname, Lisp_Object ok_if_already_exists)
diff --git a/src/filelock.c b/src/filelock.c
index baf87b7f635..b1f7d9dce61 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -152,7 +152,7 @@ get_boot_time (void)
152 mib[1] = KERN_BOOTTIME; 152 mib[1] = KERN_BOOTTIME;
153 size = sizeof (boottime_val); 153 size = sizeof (boottime_val);
154 154
155 if (sysctl (mib, 2, &boottime_val, &size, NULL, 0) >= 0) 155 if (sysctl (mib, 2, &boottime_val, &size, NULL, 0) >= 0 && size != 0)
156 { 156 {
157 boot_time = boottime_val.tv_sec; 157 boot_time = boottime_val.tv_sec;
158 return boot_time; 158 return boot_time;
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)
3018 3018
3019 Lisp_Object proclist = Qnil; 3019 Lisp_Object proclist = Qnil;
3020 3020
3021 if (sysctl (mib, 3, NULL, &len, NULL, 0) != 0) 3021 if (sysctl (mib, 3, NULL, &len, NULL, 0) != 0 || len == 0)
3022 return proclist; 3022 return proclist;
3023 3023
3024 procs = xmalloc (len); 3024 procs = xmalloc (len);
3025 if (sysctl (mib, 3, procs, &len, NULL, 0) != 0) 3025 if (sysctl (mib, 3, procs, &len, NULL, 0) != 0 || len == 0)
3026 { 3026 {
3027 xfree (procs); 3027 xfree (procs);
3028 return proclist; 3028 return proclist;
@@ -3616,7 +3616,7 @@ system_process_attributes (Lisp_Object pid)
3616 CONS_TO_INTEGER (pid, int, proc_id); 3616 CONS_TO_INTEGER (pid, int, proc_id);
3617 mib[3] = proc_id; 3617 mib[3] = proc_id;
3618 3618
3619 if (sysctl (mib, 4, &proc, &proclen, NULL, 0) != 0) 3619 if (sysctl (mib, 4, &proc, &proclen, NULL, 0) != 0 || proclen == 0)
3620 return attrs; 3620 return attrs;
3621 3621
3622 attrs = Fcons (Fcons (Qeuid, INT_TO_INTEGER (proc.ki_uid)), attrs); 3622 attrs = Fcons (Fcons (Qeuid, INT_TO_INTEGER (proc.ki_uid)), attrs);
@@ -3739,7 +3739,7 @@ system_process_attributes (Lisp_Object pid)
3739 3739
3740 mib[2] = KERN_PROC_ARGS; 3740 mib[2] = KERN_PROC_ARGS;
3741 len = MAXPATHLEN; 3741 len = MAXPATHLEN;
3742 if (sysctl (mib, 4, args, &len, NULL, 0) == 0) 3742 if (sysctl (mib, 4, args, &len, NULL, 0) == 0 && len != 0)
3743 { 3743 {
3744 int i; 3744 int i;
3745 for (i = 0; i < len; i++) 3745 for (i = 0; i < len; i++)
@@ -3785,7 +3785,7 @@ system_process_attributes (Lisp_Object pid)
3785 CONS_TO_INTEGER (pid, int, proc_id); 3785 CONS_TO_INTEGER (pid, int, proc_id);
3786 mib[3] = proc_id; 3786 mib[3] = proc_id;
3787 3787
3788 if (sysctl (mib, 4, &proc, &proclen, NULL, 0) != 0) 3788 if (sysctl (mib, 4, &proc, &proclen, NULL, 0) != 0 || proclen == 0)
3789 return attrs; 3789 return attrs;
3790 3790
3791 uid = proc.kp_eproc.e_ucred.cr_uid; 3791 uid = proc.kp_eproc.e_ucred.cr_uid;