Max Kellermann <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> this time, I have attempted to test everything, but I am sure Avuton
> will find many bugs again...
> 
> So this is a rather large refactoring of the command execution code.
> It changes the code from passing a raw file descriptor to passing a
> pointer to the client structure.
> 
> Eric said he liked to keep the file descriptor, because he can use
> fdprintf() to write both to a client and to a file, but that
> flexibility is faked by a hack within fdprintf() which has to look up
> the client structure, and it doesn't work with buffered files (e.g. a
> standard FILE*), and the current code has to hack its way around that
> limitation.  There are only two places where this flexibility is
> really needed:

stdio.h is really only good for snprintf() and maybe fgets().  There are
only minor, if any, performance benefits from using stdio.h for writing
to files and frankly not worth the headaches when it comes to error
handling, heap fragmentation and inconsistent implementations across
different OSes.   Sure the unistd.h interfaces aren't necessarily 100%
consistent across all Unices, either, but I'd rather deal directly with
those than to have to deal with both unistd.h AND/OR stdio.h being
inconsistent/broken.

I'll merge your bug fixes and memory reductions.

Unless there's a huge and measurable benefit from doing so that can't be
done with the existing interfaces.  I'm not going to change the way we
pass file descriptors everywhere and I've already stated my reasons
for that.

-- 
Eric Wong

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to