ME_Kun_Han
Committed by winlin

fix bug: run srs at startup failed. (#454)

@@ -639,7 +639,7 @@ int SrsServer::initialize_st() @@ -639,7 +639,7 @@ int SrsServer::initialize_st()
639 639
640 // check asprocess. 640 // check asprocess.
641 bool asprocess = _srs_config->get_asprocess(); 641 bool asprocess = _srs_config->get_asprocess();
642 - if (ppid == 1) { 642 + if (asprocess && ppid == 1) {
643 ret = ERROR_SYSTEM_ASSERT_FAILED; 643 ret = ERROR_SYSTEM_ASSERT_FAILED;
644 srs_error("for asprocess, ppid should never be init(1), ret=%d", ret); 644 srs_error("for asprocess, ppid should never be init(1), ret=%d", ret);
645 return ret; 645 return ret;