From: Wolfgang Bangerth Date: Fri, 27 Sep 2002 21:28:41 +0000 (+0000) Subject: Exchange the pid of the master to the detached slave. X-Git-Tag: v8.0.0~17438 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2dfe4cdc45c9f1b751c0f3adee8d79139478ba9;p=dealii.git Exchange the pid of the master to the detached slave. git-svn-id: https://svn.dealii.org/trunk@6547 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/source/sparse_direct.cc b/deal.II/lac/source/sparse_direct.cc index 2bba8eb3db..f0625e5e7a 100644 --- a/deal.II/lac/source/sparse_direct.cc +++ b/deal.II/lac/source/sparse_direct.cc @@ -390,8 +390,18 @@ SparseDirectMA27::initialize (const SparsityPattern &sp) ExcMessage ("execv returned, which it is not supposed to do!")); std::exit(1); }; - // parent process continues here. - // close unneeded end of pipe + // parent process continues + // here. first thing is to + // send the process id of the + // present process. this is + // used to make sure that the + // client can end itself when + // it finds that the master + // process was somehow + // terminated without sending + // him this information + const pid_t parent_pid = std::getpid(); + detached_mode_data->put (&parent_pid, 1, "parent_pid"); };