summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/socat/socat_1.7.4.1.bb
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2021-02-25 02:46:53 -0800
committerRobert Yang <liezhi.yang@windriver.com>2021-02-25 03:21:42 -0800
commit2fc3ec398db0998427e1d0cc351dfcc91d59a3f0 (patch)
treef2d78a5b65a63f39e872a20f00c368dc4f050ac8 /meta/recipes-connectivity/socat/socat_1.7.4.1.bb
parent93ad1ab49be03dd082a98f80464cfee9d98a3a33 (diff)
downloadopenembedded-core-contrib-rbt/socat.tar.gz
socat: Exit when the file associated with an FD is destroyedrbt/socat
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 <asselsm@gmail.com>. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Diffstat (limited to 'meta/recipes-connectivity/socat/socat_1.7.4.1.bb')
-rw-r--r--meta/recipes-connectivity/socat/socat_1.7.4.1.bb1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/socat/socat_1.7.4.1.bb b/meta/recipes-connectivity/socat/socat_1.7.4.1.bb
index 5a13af91bc..82b66aed92 100644
--- a/meta/recipes-connectivity/socat/socat_1.7.4.1.bb
+++ b/meta/recipes-connectivity/socat/socat_1.7.4.1.bb
@@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://README;beginline=257;endline=287;md5=82520b052f322ac2b5b3dfdc7c7eea86"
SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2 \
+ file://Exit-when-the-file-associated-with-an-FD-is-destroye.patch \
"
SRC_URI[md5sum] = "36cad050ecf4981ab044c3fbd75c643f"