[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] libxc: Report a better error on state file EOF.



Frediano Ziglio writes ("[Xen-devel] libxc: Report a better error on state file 
EOF."):
> If a EOF is detected in state file 4 error are reported
>  - 0-length
>  - read_exact_timed failed
>  - Error when reading batch size (0 = Success)
>  - Error when reading batch (0 = Success)
> 
> With this patch just one error is reported
>  - Error when reading batch size (32 = Broken pipe)

I approve of the idea of improving the error messages.  But I'm afraid
I must quibble with the reuse of EPIPE this way.  In general it is not
a good idea to synthesise errno values; people expect them to mean
specific things.  In this case EPIPE is an error that only the writer
on a pipe sees, so an admin who sees "Broken pipe" will expect that
the problem was that the writer detected that the reader went away.

I think a better approach would be to state explicitly (in
documentation comments) which situations cause an error report and
which don't, and simply reduce duplication.

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.