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:
parent
cc44329f37
commit
68ccd7eb64
13 changed files with 366 additions and 72 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue