1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

add ./etc/init.d/srs, refine configure to support make clean then make.

This commit is contained in:
winlin 2014-03-22 20:53:29 +08:00
parent d595f8fc96
commit 3c920b933c
7 changed files with 155 additions and 6 deletions

View file

@ -370,8 +370,12 @@ void SrsServer::on_signal(int signo)
#endif
return;
}
// TODO: handle the SIGINT, SIGTERM.
if (signo == SIGTERM) {
srs_trace("user terminate program");
exit(0);
return;
}
}
void SrsServer::close_listeners()

View file

@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR "0"
#define VERSION_MINOR "9"
#define VERSION_REVISION "24"
#define VERSION_REVISION "25"
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
// server info.
#define RTMP_SIG_SRS_KEY "srs"

View file

@ -65,6 +65,7 @@ int main(int argc, char** argv)
#endif
signal(SIGNAL_RELOAD, handler);
signal(SIGTERM, handler);
signal(SIGINT, handler);
if ((ret = _srs_config->parse_options(argc, argv)) != ERROR_SUCCESS) {