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

support reload config(listen and chunk_size) by SIGHUP(1).

This commit is contained in:
winlin 2013-11-09 22:41:44 +08:00
parent cc44329f37
commit 68ccd7eb64
13 changed files with 366 additions and 72 deletions

View file

@ -27,16 +27,23 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_core_config.hpp>
#include <stdlib.h>
#include <signal.h>
void handler(int signo)
{
srs_trace("get a signal, signo=%d", signo);
server.on_signal(signo);
}
int main(int argc, char** argv){
int ret = ERROR_SUCCESS;
signal(SIGNAL_RELOAD, handler);
if ((ret = config->parse_options(argc, argv)) != ERROR_SUCCESS) {
return ret;
}
SrsServer server;
if ((ret = server.initialize()) != ERROR_SUCCESS) {
return ret;
}