broken pipe

broken pipe

Post by Li W » Sat, 20 Apr 1996 04:00:00



I wrote a ksh program which runs every night. Sometimes this thing just die for
no reason. I just got a message like:
        savelog killed
        dwmenu[12] broken pipe.

dwmenu calls savelog which contains just two mv command to save some log files.
BTW, I am using AIX 4.1 on RS6k.

anyone here has idea what is going on?

Your help is greatly appreciated.

Thanks in advance.

Eric


 
 
 

1. Socket broken pipe error

Hi, in a typical echo server program, I used two buffers, namely
char received[BUFSIZ] and char replied[BUFSIZ],
to read from and write to a stream socket respectively. Everything was
fine until I closed the socket gracefully in the client program. The
server caught this "broken pipe" error message due to a negative read()
from the closed socket.
There shouldn't be problem with the client as it worked well with another
echo server problem.

Then I commented out the statement
"memset(replied, 0, sizeof(replied))"
which used to appear before each write to the socket in that problematic
server program. This seems to rectify the situation as read() returns
0 in the server as expected whenever I quit the client and the error
message vanishes.

Later I found that the "bzero(replied, sizeof(replied))" also caused
similar "broken pipe" message to the server.

It seems quite strange to me that upon the closure of a socket by the
client, a mere memset()/bzero() caused the server reading a socket to
return a negative value instead of 0.

Has anyone come across similar similar situation? I couldn't find any
special mention about memset() and bzero() in this regard.

Cheers
Sunny Suen

2. Why doesn't this work?

3. Broken Pipe on 220 Sendmail 8.9.3

4. Newbie needs help with NIC and Red Hat 7.2

5. broken pipe netwatch

6. ps2pcl ?

7. tar, broken pipe and core files

8. Possible PASV port theft

9. Broken Pipe & a ?

10. Broken PIPE on Xfree 2.1

11. Broken Pipes Errors with NES 3.6.1

12. TCP "Broken pipe" programming error

13. ttloop: read: Broken pipe