Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个名为mydaemon. 现在我想要另一个进程为我发送一些东西,当我派生一个子进程时,它与父进程同名。如何在没有exec功能的情况下拥有不同的进程名称?
mydaemon
exec
Linux下可以使用该prctl()函数设置进程名:
prctl()
#include <sys/prctl.h> prctl(PR_SET_NAME, "foobar");