25 lines
347 B
C++
25 lines
347 B
C++
#include <iostream>
|
|
#include <unistd.h>
|
|
#include <sys/types.h>
|
|
#include <syslog.h>
|
|
#include <sys/stat.h>
|
|
#include <fcntl.h>
|
|
#include <signal.h>
|
|
#include <stdbool.h>
|
|
|
|
int main()
|
|
{
|
|
pid_t parent = getpid();
|
|
pid_t child = fork();
|
|
|
|
if (child > 0) // parent
|
|
{
|
|
|
|
}
|
|
else // child
|
|
{
|
|
|
|
}
|
|
|
|
return EXIT_SUCCESS;
|
|
} |