"broken pipe" error on Linux

Char Snipeur Posted messages 10112 Registration date   Status Contributor Last intervention   -  
Char Snipeur Posted messages 10112 Registration date   Status Contributor Last intervention   -
Hello,
I'm posting here rather than under Linux because it's an error that appears with my program.
I created (in C++) a small server whose purpose is to return the CPU usage of the computer.
I launch it with the command nohup prog >$host.log in order to keep it alive all the time.
Everything goes well, I manage to retrieve the usage a few times, then at some point it stops, I don't have any error messages in the log, but the shell indicates:
Broken pipe
First of all, what does this error mean???
Does anyone know how to fix it? If it's due to the program or something else (the program works very well on many other servers, I doubt it's the problem).
--
Regards! I used to believe, now I am fixed.Jesus Christ
Char Sniper

1 answer

Char Snipeur Posted messages 10112 Registration date   Status Contributor Last intervention   1 331
 
Arf... same problem 2 years later and I'm coming across my message which still has no solution...
1
reda
 
ignore the signal with
signal(SIGPIPE, handler);
where handler is your signal callback
0
Char Snipeur Posted messages 10112 Registration date   Status Contributor Last intervention   1 331
 
Excuse me? Can you clarify please?
It looks more like a C call than a shell one. I have more the impression that the pipe is related to the shell, right?
0