mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: provide a vfork/exec version of system (issue #185)
The normal library system() command uses 'fork', which causes problems on IB+OPENMPI. STYLE: add Foam:: qualifier to system calls to make them easier to spot.
This commit is contained in:
@ -151,7 +151,7 @@ void Foam::helpType::displayDoc
|
||||
Info<< "Source file: " << classDirectory.c_str() << classFile << nl
|
||||
<< endl;
|
||||
|
||||
system(docBrowser);
|
||||
Foam::system(docBrowser);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -1309,7 +1309,7 @@ int main(int argc, char *argv[])
|
||||
+ "_"
|
||||
+ procFile.name()
|
||||
);
|
||||
if (system(cmd.c_str()) == -1)
|
||||
if (Foam::system(cmd.c_str()) == -1)
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Could not execute command " << cmd << endl;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -191,9 +191,15 @@ void writeRays
|
||||
str << "l " << vertI-1 << ' ' << vertI << nl;
|
||||
}
|
||||
}
|
||||
string cmd("objToVTK " + fName + " " + fName.lessExt() + ".vtk");
|
||||
Pout<< "cmd:" << cmd << endl;
|
||||
system(cmd);
|
||||
str.flush();
|
||||
|
||||
DynamicList<string> cmd(3);
|
||||
cmd.append("objToVTK");
|
||||
cmd.append(fName);
|
||||
cmd.append(fName.lessExt() + ".vtk");
|
||||
|
||||
Pout<< "cmd: objToVTK " << fName.c_str() << endl;
|
||||
Foam::system(cmd);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user