The optional command line option "--daemon" runs WeeChat like a daemon (fork, new process group, file descriptors closed).