remove hard coded work directory in multicore api
This commit is contained in:
parent
107f5cefd6
commit
a9d810d447
2 changed files with 5 additions and 4 deletions
|
@ -194,14 +194,15 @@ ProcessList::ProcessList( int n, string& summaryfile, Scheduler* pScheduler ) :
|
||||||
|
|
||||||
// When a slot is available, the main thread calls launch to instantiate a
|
// When a slot is available, the main thread calls launch to instantiate a
|
||||||
// new pareser process
|
// new pareser process
|
||||||
void ProcessList::Launch( string command, string file, AirportInfo* pai, bool last )
|
void ProcessList::Launch( string command, string work_dir, string file, AirportInfo* pai, bool last )
|
||||||
{
|
{
|
||||||
Process::Args args;
|
Process::Args args;
|
||||||
char arg[64];
|
char arg[64];
|
||||||
Pipe outPipe;
|
Pipe outPipe;
|
||||||
|
|
||||||
// generate correct command line arguments
|
// generate correct command line arguments
|
||||||
args.push_back("--work=work");
|
sprintf( arg, "--work=%s", work_dir.c_str() );
|
||||||
|
args.push_back(arg);
|
||||||
|
|
||||||
sprintf( arg, "--input=%s", file.c_str() );
|
sprintf( arg, "--input=%s", file.c_str() );
|
||||||
args.push_back(arg);
|
args.push_back(arg);
|
||||||
|
@ -818,7 +819,7 @@ void Scheduler::Schedule( int num_threads, string& summaryfile )
|
||||||
}
|
}
|
||||||
|
|
||||||
// Launch a new parser
|
// Launch a new parser
|
||||||
procList->Launch( command, filename, &originalList[i], last );
|
procList->Launch( command, work_dir, filename, &originalList[i], last );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sync up before relaunching
|
// Sync up before relaunching
|
||||||
|
|
|
@ -140,7 +140,7 @@ public:
|
||||||
|
|
||||||
// When a slot is available, the main thread calls launch to instantiate a
|
// When a slot is available, the main thread calls launch to instantiate a
|
||||||
// new pareser process
|
// new pareser process
|
||||||
void Launch( string command, string file, AirportInfo* pai, bool last );
|
void Launch( string command, string work_dir, string file, AirportInfo* pai, bool last );
|
||||||
Timespan GetNextTimeout();
|
Timespan GetNextTimeout();
|
||||||
void HandleReceivedMessages( Net::Socket::SocketList& slr );
|
void HandleReceivedMessages( Net::Socket::SocketList& slr );
|
||||||
void HandleTimeouts();
|
void HandleTimeouts();
|
||||||
|
|
Loading…
Add table
Reference in a new issue