Recent nc(1) changes
delphij at delphij.net
Thu Apr 15 19:24:58 UTC 2010
-----BEGIN PGP SIGNED MESSAGE-----
Thanks to Dima Panov, we have now figured out a behavior change that
could break some ports. I'd like to give some more details for the record.
In the past, nc(1) would give a message like "Connection to xxx xxx port
[tcp/*] succeeded" if either -v or -z is specified in stdout. In newer
nc(1) from OpenBSD, this has been changed to stderr. In -CURRENT, we
have followed OpenBSD's behavior. I think, that this behavior is more
sensible since one can, say, filter stdout and stderr to two
programs/logs to fill their need.
This unfortunately would break some ports that uses nc -z's standard
output as an indicator of whether the connection is succeeded. To solve
this, one can modify the script to use "2>&1" when getting the output,
which is compatible to the old nc(1) as well.
Another change is that nc(1) now considers '-o' as deprecated. My plan
is to remove this option before 9.0-RELEASE. Will this removal be a
problem for anyone?
Xin LI <delphij at delphij.net> http://www.delphij.net/
FreeBSD - The Power to Serve! Live free or die
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)
-----END PGP SIGNATURE-----
More information about the freebsd-ports