|
|
|
|
|
by _Soulou
4194 days ago
|
|
Hi finnh, post author here, 1. When the parent process has finished handling its connections, it just exits. The children are then considered as 'orphans' and are automatically attached to the init process. When you run your service as a daemon, that's exactly what you want, so you don't have a huge stack of processes.
2. I used syscall.ForkExec(os.Args[0], os.Args […]), but I could changed the string array os.Args by anything I want to change the arguments.
3. It could be a way to do it, it would also work, but it is not the choice we have done.
4. It may look a bit weird, but it's part of the language, you get used to it really quickly ;-) |
|