On Thu, 2021-02-25 at 03:25 -0800, Robert Yang wrote:
> In many scenarios the receipt of an EOF will coincide with the
> teardown of the file which the FD is associated with by the
> application on the other side of the file pipe. If a timeout (-t) is
> used socat continues to poll for new data (read) and send any new data
> (write) until the timeout. This can lead to input/output errors as the
> FD exists still but the file it was openned on is gone, and no check
> is done on writes.
> 
> To get around this a check is added after the EOF is received that the
> file still exists, and if not we proceed to exit immediately. This
> will avoid i/o errors and will also cause a quicker return as we don't
> have to wait for the timeout.
> 
> The original author is Mark Asselstine <[email protected]>.
> 
> Signed-off-by: Robert Yang <[email protected]>
> ---
>  ...le-associated-with-an-FD-is-destroye.patch | 62 +++++++++++++++++++
>  .../socat/socat_1.7.4.1.bb                    |  1 +
>  2 files changed, 63 insertions(+)
>  create mode 100644 
> meta/recipes-connectivity/socat/files/Exit-when-the-file-associated-with-an-FD-is-destroye.patch
> 
> diff --git 
> a/meta/recipes-connectivity/socat/files/Exit-when-the-file-associated-with-an-FD-is-destroye.patch
>  
> b/meta/recipes-connectivity/socat/files/Exit-when-the-file-associated-with-an-FD-is-destroye.patch
> new file mode 100644
> index 00000000000..b5ac62f6169
> --- /dev/null
> +++ 
> b/meta/recipes-connectivity/socat/files/Exit-when-the-file-associated-with-an-FD-is-destroye.patch
> @@ -0,0 +1,62 @@
> +From 956d4b00a101f61b4cfaafa0856b646646536492 Mon Sep 17 00:00:00 2001
> +From: Mark Asselstine <[email protected]>
> +Date: Mon, 7 Dec 2015 21:27:35 -0500
> +Subject: [PATCH] Exit when the file associated with an FD is destroyed
> +
> +In many scenarios the receipt of an EOF will coincide with the
> +teardown of the file which the FD is associated with by the
> +application on the other side of the file pipe. If a timeout (-t) is
> +used socat continues to poll for new data (read) and send any new data
> +(write) until the timeout. This can lead to input/output errors as the
> +FD exists still but the file it was openned on is gone, and no check
> +is done on writes.
> +
> +To get around this a check is added after the EOF is received that the
> +file still exists, and if not we proceed to exit immediately. This
> +will avoid i/o errors and will also cause a quicker return as we don't
> +have to wait for the timeout.
> +
> +Signed-off-by: Mark Asselstine <[email protected]>
> +
> +Upstream-Status: Submitted [[email protected]]
> +
> +Signed-off-by: Robert Yang <[email protected]>

This was written in 2015, when was it submitted? What was the response?
An idea of the current status would be good for a patch of this age.

Cheers,

Richard


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#148628): 
https://lists.openembedded.org/g/openembedded-core/message/148628
Mute This Topic: https://lists.openembedded.org/mt/80899603/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to