Roland Mainz writes: > James Carlson wrote: > > I am sponsoring this fast-track request for Vasumathi Sundaram. The > > timer is set to 01/02/2009 in light of the coming holidays. Please > > speak up if you need more time than that. > > > > In an offline discussion, the project team went to lengths to find any > > sendfilev users, > > Erm... ksh93 had support for |sendfile()|/|sendfilev()| support but it > was breaking UDP networking support (and there was no reliable way to > check this) and we removed this capability again (it gave a good > performance improvement for sending larger files but propper > cross-platform support is more important in this case).
I don't know what "breaking UDP" means (I suspect it's an application defect), but the usual expectation is that sendfile() and sendfilev() are used with stream-oriented communication -- such as TCP sockets. If someone used those functions on a UDP socket, I'd expect that's an error in the application, given that the man page says SOCK_STREAM. If the question you're asking is "how can I tell whether a file descriptor is a stream-type socket that can be used with sendfile or sendfilev?" then the answer is to use getsockopt with SOL_SOCKET, SO_TYPE and check for SOCK_STREAM. In any event, I don't think the question you're asking here is related to the case under review. I suggest bringing it up (with more details) on networking-discuss. > ... which effectively means: A shell with thread support or any other > language environment (e.g. java) shouldn't use |sendfilev()| when files > are involed, right ? No, it doesn't mean that. All programs on Solaris are effectively multithreaded. It means that you have to provide protection yourself if you use it and if there are multiple writers. Most (all?) applications that would use this have only a single writer, so the whole point is moot. -- James Carlson, Solaris Networking <james.d.carlson at sun.com> Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
