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.
This commit is contained in:
parent
8bc85d46cc
commit
0eef70aea8
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue