FloooD / custom_cs2dsrv

Jermuk's custom Counter Strike 2D Server written in C and modified by FloooD and leegao.
173.192.35.85:36000
3 stars 0 forks source link

Signal capture for ctrl+c #24

Closed leegao closed 13 years ago

leegao commented 13 years ago

the atexit registry only fires on main returning 0, which should never happen under normal circumstances. Termination usually follows ctrl+c or a sigterm/sigabort, so we need to catch these and terminate.

leegao commented 13 years ago

I'll be working on this right now

leegao commented 13 years ago

Patch: main.h

include

main.c atexit(&cleanup); signal(SIGABRT, &exit); signal(SIGTERM, &exit); signal(SIGINT, &exit);