示例fork(),c lang

I am learning about fork() and I am trying to understand this example that I found. From what I think I understand, we always use a different process for each call, both for fibonacci(n-1) and fibonacci(n-2); pid1 is suspended with waitpid() to save the last exit status of the child in fib. The same thing happens with pid2, and in the end, the return value of the last 2 processes are added together. Is it fair when said?

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/wait.h>

size_t fibonacci( size_t n )
{
    pid_t pid1, pid2;
    size_t fib;
    int status;

    switch (n)
    {
    case 0:
        return 0;
    case 1:
        return 1;
    case 2:
        return 1;
    default:
        break;
    }

    pid1 = fork();
    if (pid1 == 0)
        exit( fibonacci( n - 1 ));           // chiamo fibonacci(n-1) usando pid1
    else if (pid1 < 0)
    {
        printf("ERRORE");
        exit(EXIT_FAILURE);
    }

    pid2 = fork();

    if (pid2 == 0)
        exit( fibonacci( n - 2 ));          // chiamo fibonacci(n-1) usando pid2
    else if (pid2 < 0)
    {
        printf("ERRORE");
        exit(EXIT_FAILURE);
    }
    if (waitpid( pid1, &status, 0 ) == -1) // sospende pid1
    {
        printf("ERRORE");
        exit(EXIT_FAILURE);
    }

    fib = WEXITSTATUS( status ); // salvo in fib lo stato di uscita del figlio di pid1

    if (waitpid( pid2, &status, 0 ) == -1)  // sospendo pid2
    {
        printf("ERRORE");
        exit(EXIT_FAILURE);
    }

    return fib + WEXITSTATUS( status ); // recupero valori di ritorno dei processi
}

int main(int argc, char *argv[])
{
    int a = atoi(argv[1]);

    if (a > 0 && a < 10)
    {
        printf("Calcolo fibonacci di %d \n", a);

        printf("L' %so numero di Fibonacci e' %d.\n", argv[1], fibonacci(a));
    }
    else
    {
        printf("Devi inserire un numero compreso tra 1 e 10\n");
        exit(EXIT_FAILURE);
    }
}