linux - Ending multiple instances of a C program at once? -
i wondering best way go exiting multiple c programs @ once? i'm running same c program in 2 different terminals (linux) , communicating through interim text file. when user ends 1 of them, using ctrl-c, want them both end @ once. i've read signals can used capture user interrupting program, how program running in other terminal know when end?
a conceptual explanation plenty, or nudge in right direction need. thank you!
probably using threads receive external connections 1 or more remote access. system have check common point can call system status (normally use separated thread maintain system status, information number of remote users, , other procedures can under constant validation thread), anyway, once have thread handling remote user connection thread can request information secondary thread (system status), once thread request system status thread kill system, start disconnect users killing each connection thread.
i'm not sure if clear, anyway, if need more explanation please let me know little bit more program.
br, henrique zenoni machado
Comments
Post a Comment