C processes in Linux
From Teknologisk videncenter
There are several ways of creating a new process.
- Most used:
- fork system call family ("clone" a runnning process to two running instances of the same code)
- exec system call family (Execute a file)
- But also:
- clone system call (Like fork - but more advanced)
- system and popen system call (Can give security issues)
Advanced
prctl
prctl - operations on a process
// Changing the name of running proces
#include <sys/prctl.h>
...
prctl(PR_SET_NAME, "newname");
...