These call interfaces allow sending signals to much more varied groups of
processes than the traditional kill().
They have been present in multiple commercial UNIX variants including at least
SunOS/Solaris, HP-UX, IRIX, and Tru64, but they are not required by any standard.
These call interfaces provide a nice parallel to the extended wait*() family
functions waitid() [standard requirement] and wait6() [freebsd extension].
Supporting them also improves compatibility and portability between several
commercial UNIX flavors and FreeBSD.
On the down side actively using them in ones own code will most likely cause
problems when trying to port such code to systems like Linux and AIX which
apparently do not provide these interfaces.
Solaris manual page for these APIs can be found also in the FreeBSD web manual
The attached patch will move idtype_t definition out of <sys/wait.h> to its own
header file <sys/_idtype.h> to make it easier to include idtype_t definitions
only where it is needed. When the patch has been applied <sys/_idtype.h> and
another new header <sys/procset.h> will be included also right at the end of
<signal.h> to complete the declarations of sigsend() and sigsendset().
Fix: Apply the attached patch.
Remember to run
in /usr/src/sys/kern and /usr/src/sys/compat/freebsd32 when the patch
has been applied.
Patch attached with submission follows:
How-To-Repeat: No problem, just improved convenience, compatibility, and portability.
It is better to replace the following line in sigsend()
pset.p_op = POP_OR;
pset.p_op = POP_AND;
This is more efficient inside the kernel when scanning the process list.
Now that a bunch of new system calls from cap_rights_limit() to procctl()
have reserved entry numbers from 533 to 544, the code 533 I had originally
used in the sigsend()/sigsendset() patch needs to be changed to 545.
For bugs matching the following criteria:
Status: In Progress Changed: (is less than) 2014-06-01
Reset to default assignee and clear in-progress tags.
Mail being skipped
Apparently even Linux supports sigsend() and sigsendset() these days.
Both binary and source code compatibility with Linux will need these
calls sooner or later.