![]() |
| | #1 |
| Registered User Join Date: Oct 2002
Posts: 27
| broken pipe I have been writing a simple server program. When a user connects I create a new thread to handle the user. There is another program that is used as a client to connect to the server. The user has the option to disconnect from the server. If the user does so I close out the socket and exit the thread. But if the user just does ctrl-c to kill the client program then I get an error "Broken Pipe" on the server, and it crashes. I think this has to do with the socket still being open but no one on the other end. Does anyone know any way to have the server handle the client program being killed with out crashing the server program? Let me know if It would help for me to post the server code here. I am writing the program in C, using gcc to compile on a FreeBSD unix machine. |
| samps005 is offline | |
| | #2 |
| Registered User Join Date: Oct 2002
Posts: 27
| I decided that it would probably help to have the code, so I will attach it here. |
| samps005 is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| cont of IPC using PIPE | BMathis | C Programming | 1 | 03-15-2009 05:16 PM |
| Pipe class. | eXeCuTeR | Linux Programming | 8 | 08-21-2008 03:44 AM |
| Named pipe problem | rahul_c | C Programming | 3 | 10-02-2007 05:40 PM |
| Pipe(): Interprocess or Intraprocess comm? | @nthony | C Programming | 2 | 03-28-2007 07:27 PM |
| Pipe the console from a DLL | loobian | Windows Programming | 12 | 11-30-2003 08:55 PM |