HomeFreeBSD

MFC r335404: sort(1): Fix -m when only implicit stdin is used for input

Description

MFC r335404: sort(1): Fix -m when only implicit stdin is used for input

Observe:

printf "a\nb\nc\n" > /tmp/foo

Next command results in no output

cat /tmp/foo | sort -m

Next command results in proper output

cat /tmp/foo | sort -m -

Also works:

sort -m /tmp/foo

Some const'ification was done to simplify the actual solution of adding "-"
explicitly to the file list if we didn't have any file arguments left over.

PR: 190099

Details

Provenance
kevansAuthored on
Parents
rS335741: MFC r333221: rsu(4) does not require legal.realtek.license_ack=1
Branches
Unknown
Tags
Unknown