Exec system call

From Teknologisk videncenter
Revision as of 09:42, 17 December 2022 by Heth (talk | contribs) (Created page with "The '''exec()''' family executes a file as a new process. See fork system call for "cloning" a process. The =Simple use= The '''execlp()''' is one of the function call in...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The exec() family executes a file as a new process. See fork system call for "cloning" a process.

The

Simple use

The execlp() is one of the function call in the exec family. See manpage

#include <stdio.h>
#include <unistd.h>
int main()
{
        execlp("ls","ls","/etc", NULL);
        return 1;
}