Показать сообщение отдельно
Старый 12.10.2013, 21:23   #4
sunjob
Новичок
 
Регистрация: 08.04.2011
Сообщений: 18
По умолчанию

фсе, тему можно сдавать в архив, патч для старой версии recollindex-1.14.4, который добавляет новый ключ "-n" для подавления «переиндексации», т.е. тихий старт

--- src/index/recollindex.cpp 2010-11-27 23:40:38.000000000 +0700
+++ src/index/recollindex.cpp.2 2013-10-12 20:23:45.000000000 +0800
@@ -23,6 +23,7 @@

#include <stdio.h>
#include <signal.h>
+#include <unistd.h>
#include <errno.h>
#include <sys/time.h>
#include <sys/resource.h>
@@ -157,6 +158,7 @@
#define OPT_x 0x800
#define OPT_l 0x1000
#define OPT_b 0x2000
+#define OPT_n 0x4000

static const char usage [] =
"\n"
@@ -169,6 +171,7 @@
"recollindex -m [-w <secs>] -x [-D]\n"
" Perform real time indexing. Don't become a daemon if -D is set.\n"
" -w sets number of seconds to wait before starting.\n"
+" -n skip initial incremental indexing pass.\n"
#ifndef DISABLE_X11MON
" -x disables exit on end of x11 session\n"
#endif /* DISABLE_X11MON */
@@ -232,6 +235,7 @@
case 'i': op_flags |= OPT_i; break;
case 'l': op_flags |= OPT_l; break;
case 'm': op_flags |= OPT_m; break;
+ case 'n': op_flags |= OPT_n; break;
case 's': op_flags |= OPT_s; break;
#ifdef RCL_USE_ASPELL
case 'S': op_flags |= OPT_S; break;
@@ -333,9 +337,11 @@
if (!(op_flags & OPT_x) && !x11IsAlive())
exit(0);

- confindexer = new ConfIndexer(config, &updater);
- confindexer->index(rezero, ConfIndexer::IxTAll);
- deleteZ(confindexer);
+ if ((op_flags&OPT_n) == 0) {
+ confindexer = new ConfIndexer(config, &updater);
+ confindexer->index(rezero, ConfIndexer::IxTAll);
+ deleteZ(confindexer);
+ }
int opts = RCLMON_NONE;
if (op_flags & OPT_D)
opts |= RCLMON_NOFORK;
sunjob вне форума   Ответить с цитированием