“pid d'un processus en c” Réponses codées

pid d'un processus en c

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int pid = 0;
    printf("before the fork \n");
    pid = fork(); //create the child process
    printf("after the fork \n");
    if (pid == 0)
    {
        printf("I'm the child process, my pid is &d\n", getpid());
        exit(1);
    }
    else
    {
        printf("I'm the parent process, my pid is &d\n", getpid());
        exit(0);
    }
}
The Bad Programmer

pid d'un processus en c

# include<stdio.h>

#include <stdlib.h>

int main()

{

    int pid = 0;

    printf("before the fork \n");

    pid = fork(); //create the child process

    printf("after the fork \n");

    if (pid == 0)

    {

        printf("I'm the child process, my pid is &d\n", getpid());

        exit(1);

    }

    else

    {

        printf("I'm the parent process, my pid is &d\n", getpid());

        exit(0);

    }

}
shamain anjum

Réponses similaires à “pid d'un processus en c”

Questions similaires à “pid d'un processus en c”

Plus de réponses similaires à “pid d'un processus en c” dans C

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code