[Olsr-dev] OLSR crash: LoadPlugin and Debug level 0

Hannes Gredler (spam-protected)
Tue May 20 10:36:07 CEST 2008


On Tue, May 20, 2008 at 08:27:41AM +0000, Vittorio Curcio wrote:
|    i think that the problem is caused by the function daemon(0,0), in file
|    main.c.

and (as aaron has already has explained) it does not daemonize if
being called with a debug level > 0 or the -no-fork cmdline switch.

--

  if(olsr_cnf->debug_level == 0 && !olsr_cnf->no_fork) {
    printf("%s detaching from the current process...\n", olsrd_version);
    if (daemon(0, 0) < 0) {
      printf("daemon(3) failed: %s\n", strerror(errno));
      exit(EXIT_FAILURE);
    }
  }

--




More information about the Olsr-dev mailing list