这篇教程C++ DC_Exit函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中DC_Exit函数的典型用法代码示例。如果您正苦于以下问题:C++ DC_Exit函数的具体用法?C++ DC_Exit怎么用?C++ DC_Exit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了DC_Exit函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: dprintfvoidBaseShadow::reconnectFailed( const char* reason ){ // try one last time to release the claim, write a UserLog event // about it, and exit with a special status. dprintf( D_ALWAYS, "Reconnect FAILED: %s/n", reason ); logReconnectFailedEvent( reason ); // if the shadow was born disconnected, exit with // JOB_RECONNECT_FAILED so the schedd can make // an accurate restart report. otherwise just // exist with JOB_SHOULD_REQUEUE. if ( attemptingReconnectAtStartup ) { dprintf(D_ALWAYS,"Exiting with JOB_RECONNECT_FAILED/n"); // does not return DC_Exit( JOB_RECONNECT_FAILED ); } else { dprintf(D_ALWAYS,"Exiting with JOB_SHOULD_REQUEUE/n"); // does not return DC_Exit( JOB_SHOULD_REQUEUE ); } // Should never get here.... ASSERT(true);}
开发者ID:AlainRoy,项目名称:htcondor,代码行数:26,
示例2: main_shutdown_graceful// this can be called by other functions, or by DC when the schedd is// shutdown gracefullyvoid main_shutdown_graceful() { print_status(); dagman.dag->DumpNodeStatus( true, false ); dagman.dag->GetJobstateLog().WriteDagmanFinished( EXIT_RESTART ); dagman.CleanUp(); DC_Exit( EXIT_RESTART );}
开发者ID:AlanDeSmet,项目名称:htcondor,代码行数:9,
示例3: request_pipe_handlerintrequest_pipe_handler(Service*, int) { std::string* next_line; while ((next_line = request_buffer.GetNextLine()) != NULL) { dprintf (D_FULLDEBUG, "got work request: %s/n", next_line->c_str()); Gahp_Args args; // Parse the command... if (!(parse_gahp_command (next_line->c_str(), &args) && handle_gahp_command (args.argv, args.argc))) { dprintf (D_ALWAYS, "ERROR processing %s/n", next_line->c_str()); } // Clean up... delete next_line; } // check for an error in GetNextLine if (request_buffer.IsError() || request_buffer.IsEOF()) { dprintf (D_ALWAYS, "Request pipe closed. Exiting.../n"); DC_Exit (1); } return TRUE;}
开发者ID:bbockelm,项目名称:condor-network-accounting,代码行数:28,
示例4: cleanUpintVMGahp::quitFast(){ cleanUp(); DC_Exit(0); return TRUE;}
开发者ID:AlainRoy,项目名称:htcondor,代码行数:7,
示例5: whileintVMGahp::waitForCommand(int /*pipe_end*/){ MyString *line = NULL; while((line = m_request_buffer.GetNextLine()) != NULL) { const char *command = line->Value(); Gahp_Args args; VMRequest *new_req = NULL; if( m_inClassAd ) { if( strcasecmp(command, VMGAHP_COMMAND_CLASSAD_END) == 0 ) { m_inClassAd = false; // Everything is Ok. Now we got vmClassAd returnOutputSuccess(); }else { if( !m_jobAd->Insert(command) ) { vmprintf(D_ALWAYS, "Failed to insert /"%s/" into classAd, " "ignoring this attribute/n", command); } } }else { if(parse_vmgahp_command(command, args) && verifyCommand(args.argv, args.argc)) { new_req = preExecuteCommand(command, &args); if( new_req != NULL ) { // Execute the new request executeCommand(new_req); if(new_req->m_has_result) { movePendingReqToResultList(new_req); if (m_async_mode) { if (!m_new_results_signaled) { write_to_daemoncore_pipe("R/n"); } // So that we only do it once m_new_results_signaled = true; } } } }else { returnOutputError(); } } delete line; line = NULL; } // check if GetNextLine() returned NULL because of an error or EOF if(m_request_buffer.IsError() || m_request_buffer.IsEOF()) { vmprintf(D_ALWAYS, "Request buffer closed, exiting/n"); cleanUp(); DC_Exit(0); } return true;}
开发者ID:AlainRoy,项目名称:htcondor,代码行数:60,
示例6: DC_ExitvoidBaseShadow::shutDown( int reason ) { // exit now if there is no job ad if ( !getJobAd() ) { DC_Exit( reason ); } // if we are being called from the exception handler, return // now to prevent infinite loop in case we call EXCEPT below. if ( reason == JOB_EXCEPTION ) { return; } // Only if the job is trying to leave the queue should we // evaluate the user job policy... if( reason == JOB_EXITED || reason == JOB_COREDUMPED ) { if( !waitingToUpdateSchedd() ) { shadow_user_policy.checkAtExit(); // WARNING: 'this' may have been deleted by the time we get here!!! } } else { // if we aren't trying to evaluate the user's policy, we just // want to evict this job. evictJob( reason ); }}
开发者ID:AlainRoy,项目名称:htcondor,代码行数:28,
示例7: master_exitintmaster_exit(int retval){ cleanup_memory();#ifdef WIN32 if ( NT_ServiceFlag == TRUE ) { terminate(retval); }#endif#if defined(WANT_CONTRIB) && defined(WITH_MANAGEMENT)#if defined(HAVE_DLOPEN) || defined(WIN32) MasterPluginManager::Shutdown();#endif#endif // If we're positive that we are going to shut down, // we should clean out the shared port directory if // we created it. std::string dirname; if ( SharedPortEndpoint::CreatedSharedPortDirectory() && SharedPortEndpoint::GetDaemonSocketDir(dirname) ) { TemporaryPrivSentry tps(PRIV_CONDOR); Directory d(dirname.c_str()); d.Remove_Entire_Directory(); if (-1 == rmdir(dirname.c_str())) { dprintf(D_ALWAYS, "ERROR: failed to remove shared port temporary directory: %s (errno=%d)./n", strerror(errno), errno); } } DC_Exit(retval, shutdown_program ); return 1; // just to satisfy vc++}
开发者ID:zhangzhehust,项目名称:htcondor,代码行数:35,
示例8: main_shutdown_gracefulvoidmain_shutdown_graceful( ){ dprintf( D_ALWAYS, "main_shutdown_graceful started/n" ); delete stateMachine; DC_Exit( 0 );}
开发者ID:AlainRoy,项目名称:htcondor,代码行数:8,
示例9: holdJobvoidBaseShadow::holdJobAndExit( const char* reason, int hold_reason_code, int hold_reason_subcode ){ holdJob(reason,hold_reason_code,hold_reason_subcode); // finally, exit and tell the schedd what to do DC_Exit( JOB_SHOULD_HOLD );}
开发者ID:emaste,项目名称:htcondor,代码行数:8,
示例10: usagevoidusage(){ dprintf( D_ALWAYS, "Usage: condor_ft-gahp/n" ); DC_Exit( 1 );}
开发者ID:zhangzhehust,项目名称:htcondor,代码行数:8,
示例11: main_initvoid main_init(int argc , char * argv []){ char *testfile = NULL; ClassAd *inputAd = NULL; int i; dprintf(D_ALWAYS, "main_init() called/n"); for (i=1; i<argc; i++ ) { if (match_prefix(argv[i],"-withfile")) { i++; if (argc <= i) { fprintf(stderr, "ERROR: Argument -withfile requires a parameter/n "); exit(1); } testfile = argv[i]; } } // end of parsing command line options if ( testfile ) { FILE* fp = safe_fopen_wrapper(testfile,"r"); if (!fp) { fprintf(stderr,"ERROR: Unable to open test file %s/n", testfile); DC_Exit(1); } int EndFlag=0, ErrorFlag=0, EmptyFlag=0; if( !( inputAd=new ClassAd(fp,"***", EndFlag, ErrorFlag, EmptyFlag) ) ){ fprintf( stderr, "ERROR: Out of memory/n" ); DC_Exit( 1 ); } fclose(fp); if ( ErrorFlag || EmptyFlag ) { fprintf( stderr, "ERROR - file %s does not contain a parseable ClassAd/n", testfile); DC_Exit(1); } // since this option is for testing, process then exit ClassAd * resultAd = process_request(inputAd); dPrintAd(D_ALWAYS, *resultAd); DC_Exit( 0 ); }}
开发者ID:AlanDeSmet,项目名称:htcondor,代码行数:46,
示例12: ExitSuccessvoid ExitSuccess() { print_status(); dagman.dag->DumpNodeStatus( false, false ); dagman.dag->GetJobstateLog().WriteDagmanFinished( EXIT_OKAY ); tolerant_unlink( lockFileName ); dagman.CleanUp(); DC_Exit( EXIT_OKAY );}
开发者ID:AlanDeSmet,项目名称:htcondor,代码行数:8,
|