[cs631apue] write errors anyone?

Jan Schaumann jschauma at stevens.edu
Sat Sep 15 16:32:07 EDT 2012


jphillip <jphillip at stevens.edu> wrote:
> Hi, is anyone else having a problem where sometimes the return value of  
> write is -1 and other times it works without changing their code?  This  
> is what I'm getting on the 'avatar' host.

When write(2) returns -1, make sure to print a diagnostic error message
using strerror(3) or perror(3).  That should give you a hint as to what
went wrong.

-Jan


More information about the cs631apue mailing list