From: Philipp Stephani Date: Wed, 30 Dec 2020 21:36:07 +0000 (+0100) Subject: Minor improvements to FD_SETSIZE overflow checks. X-Git-Tag: emacs-28.0.90~4469 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0eef70aea892a5b783623a948808b5bc1131c8e0;p=emacs.git 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. --- 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);