I read when the parent process terminates before the child execute that time the child process will send the SIGHUP and SIGCONT signal. then this will work under the init process.
so i want to know child process generate a signal or not?
for that i work out the program like this, but i didn't receive any messages like signal received.

```
#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
#include<signal.h>

void handler(int signo)
{
    if(signo == SIGHUP)
        printf("SIGHUP present\n");
    else if (signo == SIGCONT)
        printf("SIGCONT present\n");
}

main()
{
    pid_t pid;
    signal(SIGCONT,handler);
    signal(SIGHUP,handler);

    if((pid=fork()) == 0)
    {
        sleep(5);                                                                                                                       
        printf("Child terminated\n");
        exit(0);
    }
    exit(0);
}

```