Files
oldlinux-files/Ref-docs/POSIX/susv3/functions/sigemptyset.html
2024-02-19 00:21:47 -05:00

144 lines
6.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
<title>sigemptyset</title>
</head>
<body bgcolor="white">
<script type="text/javascript" language="JavaScript" src="../jscript/codes.js">
</script>
<basefont size="3"> <a name="sigemptyset"></a> <a name="tag_03_684"></a><!-- sigemptyset -->
<!--header start-->
<center><font size="2">The Open Group Base Specifications Issue 6<br>
IEEE Std 1003.1-2001<br>
Copyright &copy; 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
<!--header end-->
<hr size="2" noshade>
<h4><a name="tag_03_684_01"></a>NAME</h4>
<blockquote>sigemptyset - initialize and empty a signal set</blockquote>
<h4><a name="tag_03_684_02"></a>SYNOPSIS</h4>
<blockquote class="synopsis">
<div class="box"><code><tt><sup>[<a href="javascript:open_code('CX')">CX</a>]</sup> <img src="../images/opt-start.gif" alt=
"[Option Start]" border="0"> #include &lt;<a href="../basedefs/signal.h.html">signal.h</a>&gt;<br>
<br>
int sigemptyset(sigset_t *</tt><i>set</i><tt>); <img src="../images/opt-end.gif" alt="[Option End]" border="0"></tt></code></div>
<tt><br>
</tt></blockquote>
<h4><a name="tag_03_684_03"></a>DESCRIPTION</h4>
<blockquote>
<p>The <i>sigemptyset</i>() function initializes the signal set pointed to by <i>set</i>, such that all signals defined in
IEEE&nbsp;Std&nbsp;1003.1-2001 are excluded.</p>
</blockquote>
<h4><a name="tag_03_684_04"></a>RETURN VALUE</h4>
<blockquote>
<p>Upon successful completion, <i>sigemptyset</i>() shall return 0; otherwise, it shall return -1 and set <i>errno</i> to indicate
the error.</p>
</blockquote>
<h4><a name="tag_03_684_05"></a>ERRORS</h4>
<blockquote>
<p>No errors are defined.</p>
</blockquote>
<hr>
<div class="box"><em>The following sections are informative.</em></div>
<h4><a name="tag_03_684_06"></a>EXAMPLES</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_03_684_07"></a>APPLICATION USAGE</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_03_684_08"></a>RATIONALE</h4>
<blockquote>
<p>The implementation of the <i>sigemptyset</i>() (or <a href="../functions/sigfillset.html"><i>sigfillset</i>()</a>) function
could quite trivially clear (or set) all the bits in the signal set. Alternatively, it would be reasonable to initialize part of
the structure, such as a version field, to permit binary-compatibility between releases where the size of the set varies. For such
reasons, either <i>sigemptyset</i>() or <a href="../functions/sigfillset.html"><i>sigfillset</i>()</a> must be called prior to any
other use of the signal set, even if such use is read-only (for example, as an argument to <a href=
"../functions/sigpending.html"><i>sigpending</i>()</a>). This function is not intended for dynamic allocation.</p>
<p>The <a href="../functions/sigfillset.html"><i>sigfillset</i>()</a> and <i>sigemptyset</i>() functions require that the resulting
signal set include (or exclude) all the signals defined in this volume of IEEE&nbsp;Std&nbsp;1003.1-2001. Although it is outside
the scope of this volume of IEEE&nbsp;Std&nbsp;1003.1-2001 to place this requirement on signals that are implemented as extensions,
it is recommended that implementation-defined signals also be affected by these functions. However, there may be a good reason for
a particular signal not to be affected. For example, blocking or ignoring an implementation-defined signal may have undesirable
side effects, whereas the default action for that signal is harmless. In such a case, it would be preferable for such a signal to
be excluded from the signal set returned by <a href="../functions/sigfillset.html"><i>sigfillset</i>()</a>.</p>
<p>In early proposals there was no distinction between invalid and unsupported signals (the names of optional signals that were not
supported by an implementation were not defined by that implementation). The [EINVAL] error was thus specified as a required error
for invalid signals. With that distinction, it is not necessary to require implementations of these functions to determine whether
an optional signal is actually supported, as that could have a significant performance impact for little value. The error could
have been required for invalid signals and optional for unsupported signals, but this seemed unnecessarily complex. Thus, the error
is optional in both cases.</p>
</blockquote>
<h4><a name="tag_03_684_09"></a>FUTURE DIRECTIONS</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_03_684_10"></a>SEE ALSO</h4>
<blockquote>
<p><a href="xsh_chap02_04.html#tag_02_04"><i>Signal Concepts</i></a> , <a href="sigaction.html"><i>sigaction</i>()</a> , <a href=
"sigaddset.html"><i>sigaddset</i>()</a> , <a href="sigdelset.html"><i>sigdelset</i>()</a> , <a href=
"sigfillset.html"><i>sigfillset</i>()</a> , <a href="sigismember.html"><i>sigismember</i>()</a> , <a href=
"sigpending.html"><i>sigpending</i>()</a> , <a href="sigprocmask.html"><i>sigprocmask</i>()</a> , <a href=
"sigsuspend.html"><i>sigsuspend</i>()</a> , the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001, <a href=
"../basedefs/signal.h.html"><i>&lt;signal.h&gt;</i></a></p>
</blockquote>
<h4><a name="tag_03_684_11"></a>CHANGE HISTORY</h4>
<blockquote>
<p>First released in Issue 3. Included for alignment with the POSIX.1-1988 standard.</p>
</blockquote>
<h4><a name="tag_03_684_12"></a>Issue 6</h4>
<blockquote>
<p>The SYNOPSIS is marked CX since the presence of this function in the <a href=
"../basedefs/signal.h.html"><i>&lt;signal.h&gt;</i></a> header is an extension over the ISO&nbsp;C standard.</p>
</blockquote>
<div class="box"><em>End of informative text.</em></div>
<hr>
<hr size="2" noshade>
<center><font size="2"><!--footer start-->
UNIX &reg; is a registered Trademark of The Open Group.<br>
POSIX &reg; is a registered Trademark of The IEEE.<br>
[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
"../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>
]</font></center>
<!--footer end-->
<hr size="2" noshade>
</body>
</html>