Hi,
I noticed the following behaviour, while trying to create a work around for the missing PROOF_ENVVAR feature for older ROOT versions.
I tried to start a PROOF session and disconnect from this session without terminating the PROOF server processes. From quickly looking at the source-code of TProofMgr::DetachSession, I would expect, that TProof::Detach and TProofMgr::DetachSession behave roughly the same.
However this does not be the case:
TProof::AddEnvVar("FOO","bar");
p1 = TProof::Open( proofmaster );
p1->Exec("gSystem->Getenv(\"FOO\")");
p1->GetManager()->DetachSession(p1);
// Quit ROOT, start ROOT again
p2 = TProof::Open( proofmaster );
p2->Exec("gSystem->Getenv(\"FOO\")");
does not terminate the server processes.
TProof::AddEnvVar("FOO","bar");
p1 = TProof::Open( proofmaster );
p1->Exec("gSystem->Getenv(\"FOO\")");
p1->Detach();
// Quit ROOT, start ROOT again
p2 = TProof::Open( proofmaster );
p2->Exec("gSystem->Getenv(\"FOO\")");
terminates the PROOF servers.
Unfortunately both functions doesn’t seem to be documented very well. Is the behaviour of both Detach functions intentionally different? If not, which is the intended behaviour?
Cheers,
Jörgen.