Switch to unified view

a/src/index/recollindex.cpp b/src/index/recollindex.cpp
...
...
292
    Pidfile pidfile(config->getPidfile());
292
    Pidfile pidfile(config->getPidfile());
293
293
294
    if (setpriority(PRIO_PROCESS, 0, 20) != 0) {
294
    if (setpriority(PRIO_PROCESS, 0, 20) != 0) {
295
        LOGINFO(("recollindex: can't setpriority(), errno %d\n", errno));
295
        LOGINFO(("recollindex: can't setpriority(), errno %d\n", errno));
296
    }
296
    }
297
    // Try to ionice. This does not work on all platforms
298
    rclMonIonice(config);
297
299
298
    if (op_flags & (OPT_i|OPT_e)) {
300
    if (op_flags & (OPT_i|OPT_e)) {
299
    lockorexit(&pidfile);
301
    lockorexit(&pidfile);
300
    pidfile.write_pid();
302
    pidfile.write_pid();
301
303
...
...
348
          fprintf(stderr, "daemon() failed, errno %d\n", errno);
350
          fprintf(stderr, "daemon() failed, errno %d\n", errno);
349
          LOGERR(("daemon() failed, errno %d\n", errno));
351
          LOGERR(("daemon() failed, errno %d\n", errno));
350
          exit(1);
352
          exit(1);
351
        }
353
        }
352
    }
354
    }
355
  pidfile.write_pid();
356
353
        // Not too sure if I have to redo the nice thing after daemon(),
357
        // Not too sure if I have to redo the nice thing after daemon(),
354
        // can't hurt anyway (easier than testing on all platforms...)
358
        // can't hurt anyway (easier than testing on all platforms...)
355
        if (setpriority(PRIO_PROCESS, 0, 20) != 0) {
359
        if (setpriority(PRIO_PROCESS, 0, 20) != 0) {
356
            LOGINFO(("recollindex: can't setpriority(), errno %d\n", errno));
360
            LOGINFO(("recollindex: can't setpriority(), errno %d\n", errno));
357
        }
361
        }
358
  pidfile.write_pid();
362
  // Try to ionice. This does not work on all platforms
363
  rclMonIonice(config);
364
359
    if (sleepsecs > 0) {
365
    if (sleepsecs > 0) {
360
        LOGDEB(("recollindex: sleeping %d\n", sleepsecs));
366
        LOGDEB(("recollindex: sleeping %d\n", sleepsecs));
361
        for (int i = 0; i < sleepsecs; i++) {
367
        for (int i = 0; i < sleepsecs; i++) {
362
          sleep(1);
368
          sleep(1);
363
          // Check that x11 did not go away while we were sleeping.
369
          // Check that x11 did not go away while we were sleeping.