[systemd-devel] FW: pthread_create() fails SysV in myDaemon on boot

Michal Schmidt mschmidt at redhat.com
Fri Nov 4 14:45:08 PDT 2011


On Fri, 04 Nov 2011 14:36:05 -0400 Michael D. Berger wrote:
> Your assumption is correct.  In the code I have:
>       if (argc == 2)
>       {
>          string   arg = argv[1];
>          if (arg != "--daemon")
>             throw ...
>          ::daemon(0,0);
>          isDaemon = true;
>       }

Not related to your problem with the cpu cgroup controller, but ...
daemon(3) is not the best way to daemonize a process. I suggest you
to take a look at http://0pointer.de/public/systemd-man/daemon.html

Michal


More information about the systemd-devel mailing list