I have multiple active programs and a standby program. When one of active programs dies, I will ask standby to replace it. Each program has its different cmdline. And the standby one is just "-standby". I want to replace "-standby" to real cmdline when the replacement happens. But since argc/argv are provided by linux kernel, what is the rule to format my cmdline? Can I just to memcpy to the address of argv[0]?

0 Answers