#1149508 curl sets terminal to nonblocking mode

Package:
curl
Source:
curl
Description:
command line tool for transferring data with URL syntax
Submitter:
Russell Coker
Date:
2026-09-30 05:09:02 UTC
Severity:
normal
#1149508#5
Date:
2026-09-30 05:06:49 UTC
From:
To:
This bug appeared after an upgrade from veersion 8.22.0-1.

#!/bin/bash
set -e
curl -s "http://tinyurl.com/api-create.php?url=$1"
echo ""

I have the above shell script to get a tinyurl which has been working for many
years.

URL2=$(tinyurl $1)
read PRIM

The above shell script fails with the following error on the latest version:

script-name: line 26: read: 0: read error: Resource temporarily unavailable

When I changed the tinyurl script to the following (redirectint input from
/dev/null) it started working again.  It seems that curl messes with the
terminal settings and makes the bash script fail.

#!/bin/bash
set -e
curl -s "http://tinyurl.com/api-create.php?url=$1" < /dev/null
echo ""

The expected behaviour is that it will either not change the settings or it
will change them back after doing whatever it wants to do.