From 15bab70eaed146cc5675bdc6aa496f4c871ad739 Mon Sep 17 00:00:00 2001 From: Rafal Wojtczuk Date: Wed, 16 Mar 2011 15:18:37 +0100 Subject: [PATCH] Handle pipe io in qrexec_agent properly Don't reopen pipe after each read - no need, and it could lose events. --- qrexec/qrexec_agent.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qrexec/qrexec_agent.c b/qrexec/qrexec_agent.c index 94cab149..3245d870 100644 --- a/qrexec/qrexec_agent.c +++ b/qrexec/qrexec_agent.c @@ -483,9 +483,12 @@ void handle_trigger_io() write_all_vchan_ext(&s_hdr, sizeof s_hdr); } } +// trigger_fd is nonblock - so no need to reopen +#if 0 close(trigger_fd); trigger_fd = open(QREXEC_AGENT_TRIGGER_PATH, O_RDONLY | O_NONBLOCK); +#endif } int main()