Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Bug 211579] Remove socket support in cat(1)

4 views
Skip to first unread message

bugzilla...@freebsd.org

unread,
Aug 4, 2016, 10:09:05 AM8/4/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211579

Bug ID: 211579
Summary: Remove socket support in cat(1)
Product: Base System
Version: 11.0-BETA3
Hardware: Any
OS: Any
Status: New
Keywords: patch
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: freebs...@FreeBSD.org
Reporter: vent...@geeklan.co.uk

Created attachment 173280
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=173280&action=edit
No socket

This feature was added to cat(1) to complement inetd's ability to listen on a
UNIX domain socket but the feature seems out of place for a utility that is
intended to concatenate files and better served by other tools such as netcat
perhaps.

Attached patch removes the support which was introduced in r83482.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebs...@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs...@freebsd.org"

bugzilla...@freebsd.org

unread,
Aug 4, 2016, 10:24:52 AM8/4/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211579

Maxim Konovalov <ma...@FreeBSD.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |ma...@FreeBSD.org

--- Comment #1 from Maxim Konovalov <ma...@FreeBSD.org> ---
> This feature was added to cat(1) to complement inetd's ability to listen on a > UNIX domain socket [..]

Is it really correct? I think it is just a handy way to work with unix sockets
from command line.

> Attached patch removes the support which was introduced in r83482.

What's the reason? How does it hurt?

Should we also remove "telnet -u"?

bugzilla...@freebsd.org

unread,
Aug 4, 2016, 10:44:38 AM8/4/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211579

--- Comment #2 from Sevan Janiyan <vent...@geeklan.co.uk> ---
(In reply to Maxim Konovalov from comment #1)

> Is it really correct? I think it is just a handy way to work with unix sockets from command line.

The svn history confirms it, see r83482.

> What's the reason? How does it hurt?

As I said, the feature seems out of place for a utility that is intended to
concatenate files and better served by other tools such as netcat perhaps.

bugzilla...@freebsd.org

unread,
Aug 4, 2016, 10:53:44 AM8/4/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211579

--- Comment #3 from Maxim Konovalov <ma...@FreeBSD.org> ---
(In reply to Sevan Janiyan from comment #2)

In https://svnweb.freebsd.org/base?view=revision&revision=83482 I see nothing
about inetd(8).

This feature was committed 15 years ago and since than nobody complained.

There is a non-zero probability that people are using this particular feature
in their scripts and removing it will break backward compatibility with no
particular reason.

Unix world utilities historically have a lot of overlapping functionality. So
far it works more or less ok.

Also

> a utility that is intended to concatenate files

But unix socket is a file.

bugzilla...@freebsd.org

unread,
Aug 4, 2016, 11:28:14 AM8/4/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211579

--- Comment #4 from Sevan Janiyan <vent...@geeklan.co.uk> ---
(In reply to Maxim Konovalov from comment #3)

Apologies, it's in the addition to cat.1 introduced in r83482, not in the
commit message itself.

> There is a non-zero probability that people are using this particular feature in their scripts and removing it will break backward compatibility with no particular reason.

I would argue that seeing as a major branch is about it be cut, now would be
the time to evaluate such a change, it would be quite some time before it made
it into a major release and would fish out some active participants who are
users of the feature.

bugzilla...@freebsd.org

unread,
Aug 4, 2016, 1:26:25 PM8/4/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211579

John Baldwin <j...@FreeBSD.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |j...@FreeBSD.org

--- Comment #5 from John Baldwin <j...@FreeBSD.org> ---
While 'nc' would seem to the obvious replacement, I haven't yet found a way to
get equivalent functionality. I use 'nc -kU -l /tmp/sock' to create a socket.
I can then type into that terminal to store data in netcat's "buffer". 'cat
/tmp/sock' drains whatever data is pending and exits. 'nc -dNU /tmp/sock'
comes close to this except that it will still block if there is no pending data
instead of exiting with null output. Also, given that existing scripts, etc.
might depend on this feature of cat (given it's been present for so long), it
seems best to just leave well enough alone in this case.

bugzilla...@freebsd.org

unread,
Aug 5, 2016, 7:09:22 PM8/5/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211579

Sevan Janiyan <vent...@geeklan.co.uk> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|New |Closed
Resolution|--- |Rejected
0 new messages