1 new commit in XEmacs:
https://bitbucket.org/xemacs/xemacs/commits/affc195870d6/
Changeset: affc195870d6
User: kehoea
Date: 2017-12-12 08:27:11+00:00
Summary: Set input FDs to non-blocking unconditionally, thank you Myrkraverk
src/ChangeLog addition:
2017-12-12 Aidan Kehoe <kehoea(a)parhasard.net>
* process-unix.c (unix_init_process_io_handles):
Set input FDs to non-blocking unconditionally, see recent patch
posted to xemacs-beta from Johann "Myrkraverk" Oskarsson.
Affected #: 2 files
diff -r 0f7f0274157b50c71683368d0614b8912e2b70d7 -r
affc195870d60c7f3f61d304cc01f205f63432d8 src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2017-12-12 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * process-unix.c (unix_init_process_io_handles):
+ Set input FDs to non-blocking unconditionally, see recent patch
+ posted to xemacs-beta from Johann "Myrkraverk" Oskarsson.
+
2017-12-02 Aidan Kehoe <kehoea(a)parhasard.net>
* bytecode.c (set_compiled_function_arglist):
diff -r 0f7f0274157b50c71683368d0614b8912e2b70d7 -r
affc195870d60c7f3f61d304cc01f205f63432d8 src/process-unix.c
--- a/src/process-unix.c
+++ b/src/process-unix.c
@@ -831,6 +831,25 @@
/* if sizeof(EMACS_INT) > sizeof(int) this truncates the value */
UNIX_DATA(p)->infd = (EMACS_INT) in;
UNIX_DATA(p)->errfd = (EMACS_INT) err;
+
+ /* In the event where the input file descriptor is a pipe, XEmacs as of
+ * 21.4.24 will hang on the read() system call when the pipe doesn't
+ * have enough to fill the incoming buffer.
+ *
+ * This will likely affect other kinds of blocking file descriptors also, so
+ * we unconditionally set the input fd to non-blocking mode. See:
+ *
http://mid.xemacs.org/CAA_SOw__WYNiUO=4hHhiwg0LXq7++9Xr=tnBMgN5Uc8iAa+mvg...
+ * and the related thread.
+ */
+ {
+ int f = fcntl (UNIX_DATA(p)->infd, F_SETFL, O_NONBLOCK);
+ if (f == -1)
+ {
+ warn_when_safe (Qio_error, lisp_strerror (errno),
+ "failed setting pipe (fd %ld) to nonblocking mode",
+ (EMACS_INT) in);
+ }
+ }
}
/* Move the file descriptor FD so that its number is not less than MIN. *
Repository URL:
https://bitbucket.org/xemacs/xemacs/
--
This is a commit notification from
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.