F
Falcon Kirtaran
I'm using glibc 2.7-r1 packaged by gentoo and gcc 4.2.2 also packaged by
gentoo. The following code results in the value of the void * component
of the sigval struct sent from the sending program being assigned to the
si_int member of the siginfo_t struct.
Sending process:
sigval sigval_data;
sigval_data.sival_int = 1;
sigval_data.sival_ptr = 5; /*only to test this*/
sigqueue(getppid(), SIGUSR1, sigval_data);
pause(); //wait for the parent to die.
exit(-1); //we should have died by SIGHUP before.
Receiving process's signal handler:
void h_mesg(int signal, siginfo_t * info, void * context) {
printf("DEBUG: h_mesg: int value = %i\n", info->si_int);
};
It prints that the value is 5. Have I done something silly, or is this
a bug in glibc or in something else?
gentoo. The following code results in the value of the void * component
of the sigval struct sent from the sending program being assigned to the
si_int member of the siginfo_t struct.
Sending process:
sigval sigval_data;
sigval_data.sival_int = 1;
sigval_data.sival_ptr = 5; /*only to test this*/
sigqueue(getppid(), SIGUSR1, sigval_data);
pause(); //wait for the parent to die.
exit(-1); //we should have died by SIGHUP before.
Receiving process's signal handler:
void h_mesg(int signal, siginfo_t * info, void * context) {
printf("DEBUG: h_mesg: int value = %i\n", info->si_int);
};
It prints that the value is 5. Have I done something silly, or is this
a bug in glibc or in something else?