From 6615748ac6bcff258ef548f70bdcc1ab9f740472 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Sat, 16 Mar 2013 15:22:37 +0100 Subject: [PATCH] * nsterm.m (ns_select): Don't return with result uninitialized. --- src/ChangeLog | 1 + src/nsterm.m | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 06618a543e2..3a2a36c0cf7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2013-03-16 Jan Djärv * nsterm.m (updateFrameSize:): Change resize increments if needed. + (ns_select): Don't return with result uninitialized. * nsterm.h (EmacsSavePanel, EmacsOpenPanel): Add getFilename and getDirectory. diff --git a/src/nsterm.m b/src/nsterm.m index be586010c81..40e506eab27 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -3601,6 +3601,11 @@ ns_select (int nfds, fd_set *readfds, fd_set *writefds, result = t; } } + else + { + errno = EINTR; + result = -1; + } return result; } -- 2.39.2