> The upshot of the issue is that I need sendfile to return under
 > certain conditions that do not constitute an error. The problem
 > I have is how to go about modifying the kernel routines called
 > so that they terminate the processing without returning an error
 > to the application.
 > 
 > [ ... ]
 >
 > So, first, how horrible is it to use an error code return as a
 > signal between kernel routine layers? 

My personal take is that it's gross but hardly unprecedented.  The sockets
API already does worse with travesties like connect() returning
EINPROGRESS -- and that's exposed to applications.

 > And second, assuming the first isn't judged horrible, which error would
 > be a good choice?

That's hard to say, especially without knowing more about the "certain
conditions".  But I'm curious why it's not possible to pass additional
state between the layers in the kernel.  Why are we restricted to
smuggling information through errnos?

-- 
meem
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to