Документ взят из кэша поисковой машины. Адрес оригинального документа : http://kodomo.fbb.msu.ru/hg/allpy/raw-rev/f10570153cf7
Дата изменения: Unknown
Дата индексирования: Tue Oct 2 07:57:17 2012
Кодировка: UTF-8

# HG changeset patch
# User boris
# Date 1298927833 -10800
# Node ID f10570153cf73cb3658f7a6b79c2bbb438c8ffe0
# Parent 8c7e5c16b2f41603e021b535b9944a8210b4f8f9# Parent 0bae5c1f726ba6d1594c339b42b234e82dceb992
Automated merge with ssh://kodomo/allpy

diff -r 8c7e5c16b2f4 -r f10570153cf7 blocks3d/wt/blocks3d-wt-widget.C
--- a/blocks3d/wt/blocks3d-wt-widget.C Mon Feb 28 22:20:59 2011 +0300
+++ b/blocks3d/wt/blocks3d-wt-widget.C Tue Mar 01 00:17:13 2011 +0300
@@ -117,6 +117,11 @@

Blocks3DWidget::~Blocks3DWidget()
{
+ if (!tempfile_ppid.empty() && !is_completed(tempfile_check))
+ {
+ system(str(boost::format("pkill -9 -P `cat %s` %s")
+ % tempfile_ppid % Malakite::blocks3d_call).c_str());
+ }
drop_tempfiles();
}

@@ -233,6 +238,7 @@
tempfile_html = temp_dir + "/html";
tempfile_check = temp_dir + "/check";
tempfile_sh = temp_dir + "/run.sh";
+ tempfile_ppid = temp_dir + "/ppid";

temp_dirs.push_back(temp_dir);

@@ -257,10 +263,8 @@
}

std::string cmd = str(
- boost::format("cd %s ; "
- "%s -i %s %s -H %s -d %s -m %s -t %s -T %s; "
+ boost::format("%s -i %s %s -H %s -d %s -m %s -t %s -T %s; "
"echo 'f' > %s;")
- % Malakite::temp_path
% Malakite::blocks3d_call
% tempfile_alignment
% conformity_option
@@ -272,15 +276,14 @@
% tempfile_check
);

- std::cout << cmd << std::endl;
-
std::ofstream tempfile_sh_file;
tempfile_sh_file.open(tempfile_sh.c_str());
+ tempfile_sh_file << "echo $$ > " << tempfile_ppid << ";";
tempfile_sh_file << cmd;
tempfile_sh_file.close();

// security???
- system(str(boost::format("sh %s &") % tempfile_sh.c_str()).c_str());
+ system(str(boost::format("sh %s &") % tempfile_sh).c_str());
new Wt::WBreak(results_panel);
new Wt::WText(tr("task_start"), results_panel);

diff -r 8c7e5c16b2f4 -r f10570153cf7 blocks3d/wt/blocks3d-wt-widget.h
--- a/blocks3d/wt/blocks3d-wt-widget.h Mon Feb 28 22:20:59 2011 +0300
+++ b/blocks3d/wt/blocks3d-wt-widget.h Tue Mar 01 00:17:13 2011 +0300
@@ -6,15 +6,10 @@

#include
#include
-#include
-#include
#include
-#include
#include
-#include
#include
#include
-#include

#include "config.h"
#include "work-time.h"
@@ -53,6 +48,7 @@
std::string tempfile_html;
std::string tempfile_check;
std::string tempfile_sh;
+ std::string tempfile_ppid;

static bool is_completed(std::string tempfile_check);

diff -r 8c7e5c16b2f4 -r f10570153cf7 blocks3d/wt/locales/blocks3d.xml
--- a/blocks3d/wt/locales/blocks3d.xml Mon Feb 28 22:20:59 2011 +0300
+++ b/blocks3d/wt/locales/blocks3d.xml Tue Mar 01 00:17:13 2011 +0300
@@ -5,8 +5,12 @@
Conformity file
Distance spreading
Min block width
- Bron-Kerbosh (couple cores) timeout
- Bron-Kerbosh (blocks) timeout
+
+ Bron-Kerbosh (couple cores) timeout (seconds, -1 - unlimited)
+

+
+ Bron-Kerbosh (blocks) timeout (seconds, -1 - unlimited)
+

Run
Reset
Enter delta parameter
diff -r 8c7e5c16b2f4 -r f10570153cf7 blocks3d/wt/locales/blocks3d_ru.xml
--- a/blocks3d/wt/locales/blocks3d_ru.xml Mon Feb 28 22:20:59 2011 +0300
+++ b/blocks3d/wt/locales/blocks3d_ru.xml Tue Mar 01 00:17:13 2011 +0300
@@ -6,11 +6,11 @@
Минимальная ширина блока

Ограничение по времени на работу алгоритма Брона-Кербоша
- для парных ядер (в секундах)
+ для парных ядер (в секундах, -1 - без ограничения)


Ограничение по времени на работу алгоритма Брона-Кербоша
- для блоков (в секундах)
+ для блоков (в секундах, -1 - без ограничения)

Запустить
Сбросить