signal in process communication

signal in process communication:

I 'm a example in sun_unix that signal in process communication

It's here down but I only have freebsd in my machine.
how can i do the same in freebsd

eg:
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
int
main( void ){
void sigset_catcher(int);
sighold(SIGUSR1);
sigset(SIGUSR2, sigset_catcher);
printf("Waiting for signal\n");
pause();
prntf("done\n");
exit(0);
}
void
sigset_catche( int n) {
printf("Recerved signal %d\n",n);
sigrelse(SIGUSR1);
printf("SIGUSR1 released!\n");
}

my computer errer is the sighold,sigset and the sigrelse are not exits.:confused:

There are several "families" of signal system calls. This is a very confusing situation. sighold(), sigset(), and sigrelse() all originated on System 5 Release 3. They were also documented in the SVID (System V Interface Definition).

I don't have access to a freeBSD system, but I just reviewed the online docs for freeBSD. It has two signal families available: the Berkeley family, and the Posix family. You are going to need to switch families. And I suggest that you switch to the Posix family. It is especially important that you pick a family. Don't mix system calls from different families in the same program.

I saw FreeBSD man pages for the following Posix signal system calls:
sigaction()
sigsuspend()
sigaltstack() (you will rarely need to use this one)
sigpending()
sigprocmask()

These system calls are probably going to be found more often than the other families. They will work on Suns. If you start using these calls, you will maximize the portability of your code.

thanks,i'm trying now