got rid of a number of ifdefs which should not be needed anymore
This commit is contained in:
parent
d373565e0c
commit
f6cbe86e3e
5 changed files with 4 additions and 20 deletions
|
@ -52,9 +52,7 @@ void initAsyncSigs(void (*sigcleanup)(int))
|
|||
{
|
||||
// We ignore SIGPIPE always. All pieces of code which can write to a pipe
|
||||
// must check write() return values.
|
||||
#ifndef _WIN32
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
#endif
|
||||
|
||||
// Install app signal handler
|
||||
if (sigcleanup) {
|
||||
|
@ -213,9 +211,7 @@ RclConfig *recollinit(RclInitFlags flags,
|
|||
unac_set_except_translations(unacex.c_str());
|
||||
|
||||
#ifndef IDX_THREADS
|
||||
#ifndef _WIN32
|
||||
ExecCmd::useVfork(true);
|
||||
#endif
|
||||
#else
|
||||
// Keep threads init behind log init, but make sure it's done before
|
||||
// we do the vfork choice ! The latter is not used any more actually,
|
||||
|
@ -225,15 +221,11 @@ RclConfig *recollinit(RclInitFlags flags,
|
|||
bool novfork;
|
||||
config->getConfParam("novfork", &novfork);
|
||||
if (novfork) {
|
||||
#ifndef _WIN32
|
||||
LOGDEB0(("rclinit: will use fork() for starting commands\n"));
|
||||
ExecCmd::useVfork(false);
|
||||
#endif
|
||||
} else {
|
||||
#ifndef _WIN32
|
||||
LOGDEB0(("rclinit: will use vfork() for starting commands\n"));
|
||||
ExecCmd::useVfork(true);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -28,6 +28,9 @@ using namespace std;
|
|||
|
||||
bool checkRetryFailed(RclConfig *conf, bool record)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return true;
|
||||
#else
|
||||
string cmd;
|
||||
|
||||
if (!conf->getConfParam("checkneedretryindexscript", cmd)) {
|
||||
|
@ -51,4 +54,5 @@ bool checkRetryFailed(RclConfig *conf, bool record)
|
|||
return true;
|
||||
}
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -556,11 +556,9 @@ int main(int argc, char **argv)
|
|||
if (op_flags & OPT_k) {
|
||||
indexerFlags &= ~ConfIndexer::IxFNoRetryFailed;
|
||||
} else {
|
||||
#ifndef _WIN32
|
||||
if (checkRetryFailed(config, false)) {
|
||||
indexerFlags &= ~ConfIndexer::IxFNoRetryFailed;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Pidfile pidfile(config->getPidfile());
|
||||
|
@ -684,12 +682,10 @@ int main(int argc, char **argv)
|
|||
"not going into monitor mode\n"));
|
||||
exit(1);
|
||||
} else {
|
||||
#ifndef _WIN32
|
||||
// Record success of indexing pass with failed files retries.
|
||||
if (!(indexerFlags & ConfIndexer::IxFNoRetryFailed)) {
|
||||
checkRetryFailed(config, true);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
deleteZ(confindexer);
|
||||
#ifndef _WIN32
|
||||
|
@ -727,12 +723,10 @@ int main(int argc, char **argv)
|
|||
makeIndexerOrExit(config, inPlaceReset);
|
||||
bool status = confindexer->index(rezero, ConfIndexer::IxTAll,
|
||||
indexerFlags);
|
||||
#ifndef _WIN32
|
||||
// Record success of indexing pass with failed files retries.
|
||||
if (status && !(indexerFlags & ConfIndexer::IxFNoRetryFailed)) {
|
||||
checkRetryFailed(config, true);
|
||||
}
|
||||
#endif
|
||||
if (!status)
|
||||
cerr << "Indexing failed" << endl;
|
||||
if (!confindexer->getReason().empty())
|
||||
|
|
|
@ -94,7 +94,6 @@ void docFieldsFromXattrs(RclConfig *cfg, const map<string, string>& xfields,
|
|||
void reapMetaCmds(RclConfig* cfg, const string& path,
|
||||
map<string, string>& cfields)
|
||||
{
|
||||
#ifndef _WIN32
|
||||
const vector<MDReaper>& reapers = cfg->getMDReapers();
|
||||
if (reapers.empty())
|
||||
return;
|
||||
|
@ -113,7 +112,6 @@ void reapMetaCmds(RclConfig* cfg, const string& path,
|
|||
cfields[rp->fieldname] = output;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Set fields from external commands
|
||||
|
|
|
@ -109,12 +109,8 @@ bool Uncomp::uncompressfile(const string& ifn,
|
|||
}
|
||||
|
||||
// Execute command and retrieve output file name, check that it exists
|
||||
#ifndef _WIN32
|
||||
ExecCmd ex;
|
||||
int status = ex.doexec(cmd, args, 0, &tfile);
|
||||
#else
|
||||
int status = -1;
|
||||
#endif
|
||||
if (status || tfile.empty()) {
|
||||
LOGERR(("uncompressfile: doexec: failed for [%s] status 0x%x\n",
|
||||
ifn.c_str(), status));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue