diff options
author | Philipp Stephani <phst@google.com> | 2020-12-30 22:36:07 +0100 |
---|---|---|
committer | Philipp Stephani <phst@google.com> | 2020-12-31 00:31:21 +0100 |
commit | 0eef70aea892a5b783623a948808b5bc1131c8e0 (patch) | |
tree | 02844f0feae6d72a77c7dda703016f0e46564f32 /src/process.c | |
parent | 8bc85d46cc9214a531f2d2ecb3f5fb48af8105a6 (diff) | |
download | emacs-0eef70aea892a5b783623a948808b5bc1131c8e0.tar.gz |
Minor improvements to FD_SETSIZE overflow checks.
* src/process.c (Fmake_serial_process): Add port to error data.
(connect_network_socket): Add an explanatory comment.
Diffstat (limited to 'src/process.c')
-rw-r--r-- | src/process.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/process.c b/src/process.c index ba2bb3c9e46..e845e2055e3 100644 --- a/src/process.c +++ b/src/process.c @@ -3068,7 +3068,7 @@ usage: (make-serial-process &rest ARGS) */) fd = serial_open (port); p->open_fd[SUBPROCESS_STDIN] = fd; if (FD_SETSIZE <= fd) - report_file_errno ("Opening serial port", Qnil, EMFILE); + report_file_errno ("Opening serial port", port, EMFILE); p->infd = fd; p->outfd = fd; if (fd > max_desc) @@ -3332,6 +3332,7 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos, xerrno = errno; continue; } + /* Reject file descriptors that would be too large. */ if (FD_SETSIZE <= s) { emacs_close (s); |