I am running an application based on a server and another client, but I have a problem with the send command. Whenever I do ctrl+ con the client side, the send operation kills the thread that is inside and the process executes (so that several clients install the thread to which it belongs).
If the client finishes (makes the closing socket) properly, the server does not die, but when I use the ctrl+ combination con the client, both exit.
What can I do to prevent the send command from having this behavior?
Thanks at Advance
beej guide . CTRL + C, SIGINT ( ).
, , , : , ctrl + c, , . , , , , . , , , , ( ) .
ctrl + c, . , FIN .
. , , read() . , FIN, , , 0.
- , ( , ), SIGPIPE. .
, 2 : 1. , read() 0 . 2. SIGPIPE.
1- , .
ctrl - c, SIGINT. signal() sigaction().
SIGINT
signal()
sigaction()
: ?
, , accept() recv()/read(), . ( -1), errno. errno . , , .
accept()
recv()
read()
errno
Source: https://habr.com/ru/post/1744962/More articles:NSArrayController does not work with NSMutableDictionary for NSTableView - cocoaIphone Custom UITabBarItem without rounded edges - objective-cIs it possible to use script data as insert statements from an SSIS package? - sql-server-2008How to copy javascript object to another object? - jsonWPF ShowDialog returns immediately - visual-studio-2008Can an Ajax call end before loading the DOM? - javascriptThe best approach for rails 3 I18n - ruby-on-railsBinding to an element in another node (XSLT) - htmlLaunching intro music on XNA with SoundEffect - xnaZend_Search_Lucene range query error - phpAll Articles