Date: Sat, 14 May 2016 23:47:06 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 209509] EAGAIN on shell pipes / O_NONBLOCK error in kernel ? Message-ID: <bug-209509-8-8ARN1zVfC5@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-209509-8@https.bugs.freebsd.org/bugzilla/> References: <bug-209509-8@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D209509 Jilles Tjoelker <jilles@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jilles@FreeBSD.org --- Comment #3 from Jilles Tjoelker <jilles@FreeBSD.org> --- The problem may be caused by ssh. When it starts, ssh sets fd 0, 1 and 2 to non-blocking mode if they are not TTYs, restoring them to their original st= ate on exit. This causes breakage if you use the open files (pipes or sockets) = for other things while ssh is running. Unfortunately, fixing ssh requires adding threads or processes to do blocki= ng reads and writes. On FreeBSD, although socket receives support MSG_DONTWAIT, socket sends do not (although their behaviour is affected by it slightly) a= nd pipe reads and writes do not support anything like it. Performance of common use cases may be affected negatively. As a workaround, try redirecting ssh's stderr through a 'cat'. For example, { ssh ... 2>&1 >&3 3>&- | cat >&2; } 3>&1 (Bug: this example loses ssh's exit status. Using fifos or doing pipe manipulations from C will avoid that.) --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-209509-8-8ARN1zVfC5>