From e2dfe4cdc45c9f1b751c0f3adee8d79139478ba9 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 27 Sep 2002 21:28:41 +0000 Subject: [PATCH] Exchange the pid of the master to the detached slave. git-svn-id: https://svn.dealii.org/trunk@6547 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/source/sparse_direct.cc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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"); }; -- 2.39.5