mirror of
https://repo.or.cz/socat.git
synced 2024-12-23 07:52:32 +00:00
socks4echo.sh and socks4a-echo.sh hung with new bash with read -n
This commit is contained in:
parent
aed0fcd79e
commit
38ce0b9b46
3 changed files with 13 additions and 8 deletions
3
CHANGES
3
CHANGES
|
@ -1,4 +1,7 @@
|
||||||
|
|
||||||
|
testing:
|
||||||
|
socks4echo.sh and socks4a-echo.sh hung with new bash with read -n
|
||||||
|
|
||||||
####################### V 1.7.3.1:
|
####################### V 1.7.3.1:
|
||||||
|
|
||||||
security:
|
security:
|
||||||
|
|
|
@ -12,11 +12,12 @@
|
||||||
# socat tcp-l:1080,reuseaddr,crlf system:"socks4a-echo.sh"
|
# socat tcp-l:1080,reuseaddr,crlf system:"socks4a-echo.sh"
|
||||||
|
|
||||||
# older bash and ksh do not have -n option to read command; we try dd then
|
# older bash and ksh do not have -n option to read command; we try dd then
|
||||||
if echo a |read -n 1 null >/dev/null 2>&1; then
|
#if echo a |read -n 1 null >/dev/null 2>&1; then
|
||||||
HAVE_READ_N=1
|
# HAVE_READ_N=1
|
||||||
else
|
#else
|
||||||
|
# and newer bash (4.3) has some other problem with read -n
|
||||||
HAVE_READ_N=
|
HAVE_READ_N=
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
if type socat >/dev/null 2>&1; then
|
if type socat >/dev/null 2>&1; then
|
||||||
SOCAT=socat
|
SOCAT=socat
|
||||||
|
|
|
@ -11,11 +11,12 @@
|
||||||
# socat tcp-l:1080,reuseaddr,crlf system:"socks4echo.sh"
|
# socat tcp-l:1080,reuseaddr,crlf system:"socks4echo.sh"
|
||||||
|
|
||||||
# older bash and ksh do not have -n option to read command; we try dd then
|
# older bash and ksh do not have -n option to read command; we try dd then
|
||||||
if echo a |read -n 1 null >/dev/null 2>&1; then
|
#if echo a |read -n 1 null >/dev/null 2>&1; then
|
||||||
HAVE_READ_N=1
|
# HAVE_READ_N=1
|
||||||
else
|
#else
|
||||||
|
# and newer bash (4.3) has some other problem with read -n
|
||||||
HAVE_READ_N=
|
HAVE_READ_N=
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
if type socat >/dev/null 2>&1; then
|
if type socat >/dev/null 2>&1; then
|
||||||
SOCAT=socat
|
SOCAT=socat
|
||||||
|
|
Loading…
Reference in a new issue