mbdriver/src/lpdriver.cxx
// ===========================================================================
// Start the log presentation process.
// Do this here rather from the Perl Script, so that waiting until
// the log presentation is ready before starting the Perl script,
// can be handled in the C++ code.  The log presentation listener
// can, once it has the connection, enable the model build to go
// ahead.
//
Start the log presentation process.
Do this here rather from the Perl Script, so that waiting until
the log presentation is ready before starting the Perl script,
can be handled in the C++ code.  The log presentation listener
can, once it has the connection, enable the model build to go
ahead.
Start the log presentation process . Do this here rather from the Perl Script so that waiting until the log presentation is ready before starting the Perl script can be handled in the C ++ code . The log presentation listener can once it has the connection enable the model build to go ahead .
void ServerToPresentation::ready(Listener &listener)
{
    string lpcmd = psethome();
    lpcmd.append("/bin/log_presentation");
    static char *argv[] = { 
	"-lpservice",
	NULL,
	"-passservice",
	NULL,
	NULL,
	NULL};
    argv[1] = (char *)lpservice();
    argv[3] = (char *)passservice();
    if (trace_sends) {
	argv[4] = "-trace_sends";
    }
    {
	Exclusion s(had_progress_mutex, "init progress starting lp");
	had_progress = false;
	done_sent = false;
    }
    presentationPid = start_process(lpcmd.c_str(), argv, 0);
    if (presentationPid == null_pid) {
	msg("Failed to start the log presentation.", catastrophe_sev) << eom;
	listener.shut();
	lpListener = NULL;
    }
    else {
	lpListener = &listener;
    }
    lpPid = presentationPid;
#if 0
    init_lp_service(lpservice(), "0");
#endif
    ready_monitor.lock();
    server_ready = true;
    ready_monitor.notify();
    ready_monitor.unlock();
}
void ServerToPresentation :: ready ( Listener & listener ) { string lpcmd = psethome ( ) ; lpcmd . append ( " " ) ; static char * argv [ ] = { " " , NULL , " " , NULL , NULL , NULL } ; argv [ 1 ] = ( char * ) lpservice ( ) ; argv [ 3 ] = ( char * ) passservice ( ) ; if ( trace_sends ) { argv [ 4 ] = " " ; } { Exclusion s ( had_progress_mutex , " " ) ; had_progress = false ; done_sent = false ; } presentationPid = start_process ( lpcmd . c_str ( ) , argv , 0 ) ; if ( presentationPid == null_pid ) { msg ( " " , catastrophe_sev ) << eom ; listener . shut ( ) ; lpListener = NULL ; } else { lpListener = & listener ; } lpPid = presentationPid ; #if 0 init_lp_service ( lpservice ( ) , " " ) ; #endif ready_monitor . lock ( ) ; server_ready = true ; ready_monitor . notify ( ) ; ready_monitor . unlock ( ) ; }
Start the log presentation process.
Start the log presentation process .
// Form the process filename and args.