Date: Wed, 26 Sep 2001 02:08:25 -0700 (PDT) From: Matt Dillon <dillon@earth.backplane.com> To: Ruslan Ermilov <ru@FreeBSD.ORG> Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/bin/cat cat.1 cat.c Message-ID: <200109260908.f8Q98Pm11521@earth.backplane.com> References: <200109150039.f8F0dFZ41705@freefall.freebsd.org> <20010925211639.C57333@sunbay.com> <200109251909.f8PJ9eJ03402@earth.backplane.com> <20010926115717.E29020@sunbay.com>
next in thread | previous in thread | raw e-mail | index | archive | help
:> a different errno. I see no particular need to stat the path, no ill :> effects will occur if the connect() fails. :> :Just because EOPNOTSUPP from open(2) doesn't necessarily mean that the :underlying object is of type socket. : : :Cheers, :-- :Ruslan Ermilov Oracle Developer/DBA, Yes, and.... so what? I never said it would be. The point is to simply minimize the number of unnecessary system calls for the common case. There is no need to stat() the file, you simply try to open() it. 99.9999% of the paths used with cat are simple files. There is no need to check whether it's a socket; if the open fails with a specific errno you simply try to connect() to it. If it isn't a socket, the connect() will fail. There is no need for anything more sophisticated. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200109260908.f8Q98Pm11521>