Difference between revisions of "C processes in Linux"

From Teknologisk videncenter
Jump to: navigation, search
m (Replaced content with " =Advanced= ==prctl== prctl - operations on a process <source lang=c> // Changing the name of running proces #include <sys/prctl.h> ... prctl(PR_SET_NAME, "newname")...")
m
Line 1: Line 1:
 
+
There are several ways of creating a new process.
 
+
*Most used:
 +
**[[fork system call]] family
 +
**[[exec system call]] family
 +
*But also:
 +
**[[clone system call]] (Like [[fork system call|fork]] - but more advanced)
 +
**[[system and popen system call]]  (Can give security issues)
 
=Advanced=
 
=Advanced=
  
Line 12: Line 17:
 
...
 
...
 
</source>
 
</source>
 +
=Links=
 +
*[http://boron.physics.metu.edu.tr/ozdogan/SystemsProgramming/week4/node8.html Creating processes]
 
[[Category:Linux]][[Category:C]]
 
[[Category:Linux]][[Category:C]]

Revision as of 08:56, 17 December 2022

There are several ways of creating a new process.

Advanced

prctl

prctl - operations on a process

// Changing the name of running proces
#include <sys/prctl.h>
...
    prctl(PR_SET_NAME, "newname");
...

Links