From bff0cf70bee9ae71dda7d67bb9209ac8be1bbbbd Mon Sep 17 00:00:00 2001 From: dockes Date: Fri, 2 Feb 2007 10:09:10 +0000 Subject: [PATCH] do x11 check between sleeping and starting in recollindex -m --- src/index/recollindex.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/index/recollindex.cpp b/src/index/recollindex.cpp index e65ccdbb..a2b0f813 100644 --- a/src/index/recollindex.cpp +++ b/src/index/recollindex.cpp @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "@(#$Id: recollindex.cpp,v 1.30 2006-12-24 07:40:26 dockes Exp $ (C) 2004 J.F.Dockes"; +static char rcsid[] = "@(#$Id: recollindex.cpp,v 1.31 2007-02-02 10:09:10 dockes Exp $ (C) 2004 J.F.Dockes"; #endif /* * This program is free software; you can redistribute it and/or modify @@ -37,6 +37,7 @@ using namespace std; #include "smallut.h" #include "pathut.h" #include "rclmon.h" +#include "x11mon.h" // Globals for exit cleanup ConfIndexer *confindexer; @@ -353,6 +354,10 @@ int main(int argc, const char **argv) LOGDEB(("recollindex: sleeping %d\n", sleepsecs)); sleep(sleepsecs); } + // Check that x11 did not go away while we were sleeping. + if (!(op_flags & OPT_x) && !x11IsAlive()) + exit(0); + confindexer = new ConfIndexer(config, &updater); confindexer->index(rezero); delete confindexer;