mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [09/14] mesos-site git commit: Updated the website built from mesos SHA: f8c8c35.
Date Thu, 14 Jun 2018 04:22:18 GMT
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/ac68e329/content/api/latest/c++/inherit_8hpp.html
----------------------------------------------------------------------
diff --git a/content/api/latest/c++/inherit_8hpp.html b/content/api/latest/c++/inherit_8hpp.html
index 93b48e2..b2d1dbd 100644
--- a/content/api/latest/c++/inherit_8hpp.html
+++ b/content/api/latest/c++/inherit_8hpp.html
@@ -50,6 +50,7 @@
 <div class="header">
   <div class="summary">
 <a href="#namespaces">Namespaces</a> &#124;
+<a href="#typedef-members">Typedefs</a> &#124;
 <a href="#func-members">Functions</a>  </div>
   <div class="headertitle">
 <div class="title">inherit.hpp File Reference</div>  </div>
@@ -60,6 +61,7 @@
 <code>#include &lt;<a class="el" href="try_8hpp_source.html">stout/try.hpp</a>&gt;</code><br
/>
 <code>#include &lt;<a class="el" href="3rdparty_2stout_2include_2stout_2windows_8hpp_source.html">stout/windows.hpp</a>&gt;</code><br
/>
 <code>#include &lt;<a class="el" href="int__fd_8hpp_source.html">stout/os/int_fd.hpp</a>&gt;</code><br
/>
+<code>#include &lt;processthreadsapi.h&gt;</code><br />
 </div>
 <p><a href="inherit_8hpp_source.html">Go to the source code of this file.</a></p>
 <table class="memberdecls">
@@ -70,8 +72,15 @@ Namespaces</h2></td></tr>
 <tr class="memitem:namespaceinternal_1_1windows"><td class="memItemLeft" align="right"
valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a
class="el" href="namespaceinternal_1_1windows.html">internal::windows</a></td></tr>
 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
 </table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
+Typedefs</h2></td></tr>
+<tr class="memitem:a57ccac11227b87ed48b2798ebc1c5e04"><td class="memItemLeft" align="right"
valign="top">typedef _PROC_THREAD_ATTRIBUTE_LIST&#160;</td><td class="memItemRight"
valign="bottom"><a class="el" href="namespaceinternal_1_1windows.html#a57ccac11227b87ed48b2798ebc1c5e04">internal::windows::AttributeList</a></td></tr>
+<tr class="separator:a57ccac11227b87ed48b2798ebc1c5e04"><td class="memSeparator"
colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
 Functions</h2></td></tr>
+<tr class="memitem:afff48a941caf0e5c0334ca89116ad7d0"><td class="memItemLeft" align="right"
valign="top"><a class="el" href="classResult.html">Result</a>&lt; std::shared_ptr&lt;
AttributeList &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a
class="el" href="namespaceinternal_1_1windows.html#afff48a941caf0e5c0334ca89116ad7d0">internal::windows::create_attributes_list_for_handles</a>
(const std::vector&lt; HANDLE &gt; &amp;handles)</td></tr>
+<tr class="separator:afff48a941caf0e5c0334ca89116ad7d0"><td class="memSeparator"
colspan="2">&#160;</td></tr>
 <tr class="memitem:a9dc48dc50b21cb8cee5237630460c4bd"><td class="memItemLeft" align="right"
valign="top"><a class="el" href="classTry.html">Try</a>&lt; <a class="el"
href="structNothing.html">Nothing</a> &gt;&#160;</td><td class="memItemRight"
valign="bottom"><a class="el" href="namespaceinternal_1_1windows.html#a9dc48dc50b21cb8cee5237630460c4bd">internal::windows::set_inherit</a>
(const <a class="el" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a>
&amp;fd, const bool inherit)</td></tr>
 <tr class="separator:a9dc48dc50b21cb8cee5237630460c4bd"><td class="memSeparator"
colspan="2">&#160;</td></tr>
 </table>

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/ac68e329/content/api/latest/c++/inherit_8hpp_source.html
----------------------------------------------------------------------
diff --git a/content/api/latest/c++/inherit_8hpp_source.html b/content/api/latest/c++/inherit_8hpp_source.html
index 9402038..771c1fd 100644
--- a/content/api/latest/c++/inherit_8hpp_source.html
+++ b/content/api/latest/c++/inherit_8hpp_source.html
@@ -52,16 +52,22 @@
 <div class="title">inherit.hpp</div>  </div>
 </div><!--header-->
 <div class="contents">
-<a href="inherit_8hpp.html">Go to the documentation of this file.</a><div
class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">
   1</span>&#160;<span class="comment">// Licensed under the Apache License,
Version 2.0 (the &quot;License&quot;);</span></div><div class="line"><a
name="l00002"></a><span class="lineno">    2</span>&#160;<span
class="comment">// you may not use this file except in compliance with the License.</span></div><div
class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span
class="comment">// You may obtain a copy of the License at</span></div><div
class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span
class="comment">//</span></div><div class="line"><a name="l00005"></a><span
class="lineno">    5</span>&#160;<span class="comment">//  http://www.apache.org/licenses/LICENSE-2.0</span></div><div
class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span
class="comment">//</span
 ></div><div class="line"><a name="l00007"></a><span class="lineno">
   7</span>&#160;<span class="comment">// Unless required by applicable law
or agreed to in writing, software</span></div><div class="line"><a name="l00008"></a><span
class="lineno">    8</span>&#160;<span class="comment">// distributed under
the License is distributed on an &quot;AS IS&quot; BASIS,</span></div><div
class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span
class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div
class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span
class="comment">// See the License for the specific language governing permissions and</span></div><div
class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span
class="comment">// limitations under the License.</span></div><div class="line"><a
name="l00012"></a><span class="lineno">   12</span>&#160;</div><div
class="lin
 e"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span
class="preprocessor">#ifndef __STOUT_INTERNAL_WINDOWS_INHERIT_HPP__</span></div><div
class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span
class="preprocessor">#define __STOUT_INTERNAL_WINDOWS_INHERIT_HPP__</span></div><div
class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div><div
class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span
class="preprocessor">#include &lt;<a class="code" href="error_8hpp.html">stout/error.hpp</a>&gt;</span></div><div
class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span
class="preprocessor">#include &lt;<a class="code" href="nothing_8hpp.html">stout/nothing.hpp</a>&gt;</span></div><div
class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span
class="preprocessor">#include &lt;<a class="code" href="try_8hpp.html">stout/try.hpp</a>&gt;</span></div><div
class="line"><a 
 name="l00019"></a><span class="lineno">   19</span>&#160;<span
class="preprocessor">#include &lt;<a class="code" href="3rdparty_2stout_2include_2stout_2windows_8hpp.html">stout/windows.hpp</a>&gt;</span></div><div
class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;</div><div
class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span
class="preprocessor">#include &lt;<a class="code" href="int__fd_8hpp.html">stout/os/int_fd.hpp</a>&gt;</span></div><div
class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div
class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span
class="keyword">namespace </span><a class="code" href="namespaceinternal.html">internal</a>
{</div><div class="line"><a name="l00024"></a><span class="lineno">
  24</span>&#160;<span class="keyword">namespace </span>windows {</div><div
class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div><div
class="line"><a n
 ame="l00026"></a><span class="lineno">   26</span>&#160;<span
class="comment">// This function enables or disables inheritance for a Windows file handle.</span></div><div
class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span
class="comment">//</span></div><div class="line"><a name="l00028"></a><span
class="lineno">   28</span>&#160;<span class="comment">// NOTE: By default,
handles on Windows are not inheritable, so this is</span></div><div class="line"><a
name="l00029"></a><span class="lineno">   29</span>&#160;<span
class="comment">// primarily used to enable inheritance when passing handles to child processes,</span></div><div
class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span
class="comment">// and subsequently disable inheritance.</span></div><div
class="line"><a name="l00031"></a><span class="lineno"><a class="line"
href="namespaceinternal_1_1windows.html#a9dc48dc50b21cb8cee5237630460c4bd">   31</a></span>&#160;<span
class="
 keyword">inline</span> <a class="code" href="classTry.html">Try&lt;Nothing&gt;</a>
<a class="code" href="namespaceinternal_1_1windows.html#a9dc48dc50b21cb8cee5237630460c4bd">set_inherit</a>(<span
class="keyword">const</span> <a class="code" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a>&amp;
fd, <span class="keyword">const</span> <span class="keywordtype">bool</span>
inherit)</div><div class="line"><a name="l00032"></a><span class="lineno">
  32</span>&#160;{</div><div class="line"><a name="l00033"></a><span
class="lineno">   33</span>&#160;  <span class="keyword">const</span>
BOOL result = ::SetHandleInformation(</div><div class="line"><a name="l00034"></a><span
class="lineno">   34</span>&#160;      fd, HANDLE_FLAG_INHERIT, inherit ? HANDLE_FLAG_INHERIT
: 0);</div><div class="line"><a name="l00035"></a><span class="lineno">
  35</span>&#160;</div><div class="line"><a name="l00036"></a><span
class="lineno">   36</span>&#160;  <span class="keywordflow">if</spa
 n> (result == FALSE) {</div><div class="line"><a name="l00037"></a><span
class="lineno">   37</span>&#160;    <span class="keywordflow">return</span>
<a class="code" href="classWindowsError.html">WindowsError</a>();</div><div
class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;
 }</div><div class="line"><a name="l00039"></a><span class="lineno">
  39</span>&#160;</div><div class="line"><a name="l00040"></a><span
class="lineno">   40</span>&#160;  <span class="keywordflow">return</span>
<a class="code" href="structNothing.html">Nothing</a>();</div><div class="line"><a
name="l00041"></a><span class="lineno">   41</span>&#160;}</div><div
class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div
class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;}
<span class="comment">// namespace windows {</span></div><div class="line"><a
name="l00044"></a><span class="lineno">   44</span>&#160;} <span
class="comment">// namespace in
 ternal {</span></div><div class="line"><a name="l00045"></a><span
class="lineno">   45</span>&#160;</div><div class="line"><a name="l00046"></a><span
class="lineno">   46</span>&#160;<span class="preprocessor">#endif // __STOUT_INTERNAL_WINDOWS_INHERIT_HPP__</span></div><div
class="ttc" id="structNothing_html"><div class="ttname"><a href="structNothing.html">Nothing</a></div><div
class="ttdef"><b>Definition:</b> nothing.hpp:16</div></div>
+<a href="inherit_8hpp.html">Go to the documentation of this file.</a><div
class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">
   1</span>&#160;<span class="comment">// Licensed under the Apache License,
Version 2.0 (the &quot;License&quot;);</span></div><div class="line"><a
name="l00002"></a><span class="lineno">    2</span>&#160;<span
class="comment">// you may not use this file except in compliance with the License.</span></div><div
class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span
class="comment">// You may obtain a copy of the License at</span></div><div
class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span
class="comment">//</span></div><div class="line"><a name="l00005"></a><span
class="lineno">    5</span>&#160;<span class="comment">//  http://www.apache.org/licenses/LICENSE-2.0</span></div><div
class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span
class="comment">//</span
 ></div><div class="line"><a name="l00007"></a><span class="lineno">
   7</span>&#160;<span class="comment">// Unless required by applicable law
or agreed to in writing, software</span></div><div class="line"><a name="l00008"></a><span
class="lineno">    8</span>&#160;<span class="comment">// distributed under
the License is distributed on an &quot;AS IS&quot; BASIS,</span></div><div
class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span
class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div
class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span
class="comment">// See the License for the specific language governing permissions and</span></div><div
class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span
class="comment">// limitations under the License.</span></div><div class="line"><a
name="l00012"></a><span class="lineno">   12</span>&#160;</div><div
class="lin
 e"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span
class="preprocessor">#ifndef __STOUT_INTERNAL_WINDOWS_INHERIT_HPP__</span></div><div
class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span
class="preprocessor">#define __STOUT_INTERNAL_WINDOWS_INHERIT_HPP__</span></div><div
class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div><div
class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span
class="preprocessor">#include &lt;<a class="code" href="error_8hpp.html">stout/error.hpp</a>&gt;</span></div><div
class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span
class="preprocessor">#include &lt;<a class="code" href="nothing_8hpp.html">stout/nothing.hpp</a>&gt;</span></div><div
class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span
class="preprocessor">#include &lt;<a class="code" href="try_8hpp.html">stout/try.hpp</a>&gt;</span></div><div
class="line"><a 
 name="l00019"></a><span class="lineno">   19</span>&#160;<span
class="preprocessor">#include &lt;<a class="code" href="3rdparty_2stout_2include_2stout_2windows_8hpp.html">stout/windows.hpp</a>&gt;</span></div><div
class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;</div><div
class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span
class="preprocessor">#include &lt;<a class="code" href="int__fd_8hpp.html">stout/os/int_fd.hpp</a>&gt;</span></div><div
class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div
class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span
class="preprocessor">#include &lt;processthreadsapi.h&gt;</span></div><div
class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div
class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span
class="keyword">namespace </span><a class="code" href="namespaceinternal.html">internal</a>
{</div>
 <div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span
class="keyword">namespace </span>windows {</div><div class="line"><a
name="l00027"></a><span class="lineno">   27</span>&#160;</div><div
class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span
class="comment">// This function creates `LPPROC_THREAD_ATTRIBUTE_LIST`, which is used</span></div><div
class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span
class="comment">// to whitelist handles sent to a child process.</span></div><div
class="line"><a name="l00030"></a><span class="lineno"><a class="line"
href="namespaceinternal_1_1windows.html#a57ccac11227b87ed48b2798ebc1c5e04">   30</a></span>&#160;<span
class="keyword">typedef</span> _PROC_THREAD_ATTRIBUTE_LIST <a class="code" href="namespaceinternal_1_1windows.html#a57ccac11227b87ed48b2798ebc1c5e04">AttributeList</a>;</div><div
class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span

 class="keyword">inline</span> <a class="code" href="classResult.html">Result&lt;std::shared_ptr&lt;AttributeList&gt;</a>&gt;</div><div
class="line"><a name="l00032"></a><span class="lineno"><a class="line"
href="namespaceinternal_1_1windows.html#afff48a941caf0e5c0334ca89116ad7d0">   32</a></span>&#160;<a
class="code" href="namespaceinternal_1_1windows.html#afff48a941caf0e5c0334ca89116ad7d0">create_attributes_list_for_handles</a>(<span
class="keyword">const</span> std::vector&lt;HANDLE&gt;&amp; handles)</div><div
class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;{</div><div
class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;
 <span class="keywordflow">if</span> (handles.empty()) {</div><div class="line"><a
name="l00035"></a><span class="lineno">   35</span>&#160;    <span
class="keywordflow">return</span> <a class="code" href="structNone.html">None</a>();</div><div
class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;
 
 }</div><div class="line"><a name="l00037"></a><span class="lineno">
  37</span>&#160;</div><div class="line"><a name="l00038"></a><span
class="lineno">   38</span>&#160;  SIZE_T <a class="code" href="namespaceos_1_1stat.html#a7a116891923bc8b5d8c50f78da8657be">size</a>
= 0;</div><div class="line"><a name="l00039"></a><span class="lineno">
  39</span>&#160;  BOOL result = ::InitializeProcThreadAttributeList(</div><div
class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;
     <span class="keyword">nullptr</span>, <span class="comment">// Pointer
to _PROC_THREAD_ATTRIBUTE_LIST. This</span></div><div class="line"><a
name="l00041"></a><span class="lineno">   41</span>&#160;       
       <span class="comment">// parameter can be `nullptr` to determine the buffer</span></div><div
class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;
              <span class="comment">// size required to support the specified number
of</span></div><div class="line">
 <a name="l00043"></a><span class="lineno">   43</span>&#160;
              <span class="comment">// attributes.</span></div><div class="line"><a
name="l00044"></a><span class="lineno">   44</span>&#160;      1,
      <span class="comment">// Count of attributes to be added to the list.</span></div><div
class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;
     0,       <span class="comment">// Reserved and must be zero.</span></div><div
class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;
     &amp;size);  <span class="comment">// Size in bytes required for the attribute
list.</span></div><div class="line"><a name="l00047"></a><span
class="lineno">   47</span>&#160;</div><div class="line"><a name="l00048"></a><span
class="lineno">   48</span>&#160;  <span class="keywordflow">if</span>
(result == FALSE) {</div><div class="line"><a name="l00049"></a><span
class="lineno">   49</span>&#160;    <span class="keywordflow">if</span>
(::GetLastError()
  != ERROR_INSUFFICIENT_BUFFER) {</div><div class="line"><a name="l00050"></a><span
class="lineno">   50</span>&#160;      <span class="keywordflow">return</span>
<a class="code" href="classWindowsError.html">WindowsError</a>();</div><div
class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;
   }</div><div class="line"><a name="l00052"></a><span class="lineno">
  52</span>&#160;  }</div><div class="line"><a name="l00053"></a><span
class="lineno">   53</span>&#160;</div><div class="line"><a name="l00054"></a><span
class="lineno">   54</span>&#160;  std::shared_ptr&lt;AttributeList&gt;
attribute_list(</div><div class="line"><a name="l00055"></a><span
class="lineno">   55</span>&#160;      reinterpret_cast&lt;AttributeList*&gt;(std::malloc(size)),</div><div
class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;
     [](AttributeList* p) {</div><div class="line"><a name="l00057"></a><span
class="lineno">   57</span>&#160;        <span class="comment
 ">// NOTE: This delete API does not return anything, nor can it</span></div><div
class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;
       <span class="comment">// fail, so it is safe to call it regardless of the</span></div><div
class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;
       <span class="comment">// initialization state of `p`.</span></div><div
class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;
       ::DeleteProcThreadAttributeList(p);</div><div class="line"><a name="l00061"></a><span
class="lineno">   61</span>&#160;        std::free(p);</div><div class="line"><a
name="l00062"></a><span class="lineno">   62</span>&#160;      });</div><div
class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div
class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;
 <span class="keywordflow">if</span> (attribute_list == <span class="keyword">nullptr</span>)
{</div><div cla
 ss="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;
   <span class="comment">// `std::malloc` failed.</span></div><div class="line"><a
name="l00066"></a><span class="lineno">   66</span>&#160;    <span
class="keywordflow">return</span> <a class="code" href="classWindowsError.html">WindowsError</a>(ERROR_OUTOFMEMORY);</div><div
class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;
 }</div><div class="line"><a name="l00068"></a><span class="lineno">
  68</span>&#160;</div><div class="line"><a name="l00069"></a><span
class="lineno">   69</span>&#160;  result =</div><div class="line"><a
name="l00070"></a><span class="lineno">   70</span>&#160;    ::InitializeProcThreadAttributeList(attribute_list.get(),
1, 0, &amp;<a class="code" href="namespaceos_1_1stat.html#a7a116891923bc8b5d8c50f78da8657be">size</a>);</div><div
class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div><div
class="line"><a name="l00072"></a><span class="line
 no">   72</span>&#160;  <span class="keywordflow">if</span> (result
== FALSE) {</div><div class="line"><a name="l00073"></a><span class="lineno">
  73</span>&#160;    <span class="keywordflow">return</span> <a class="code"
href="classWindowsError.html">WindowsError</a>();</div><div class="line"><a
name="l00074"></a><span class="lineno">   74</span>&#160;  }</div><div
class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div
class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;
 result = ::UpdateProcThreadAttribute(</div><div class="line"><a name="l00077"></a><span
class="lineno">   77</span>&#160;      attribute_list.get(),               <span
class="comment">// Pointer to list structure.</span></div><div class="line"><a
name="l00078"></a><span class="lineno">   78</span>&#160;      0,
                                 <span class="comment">// Reserved and must be 0.</span></div><div
class="line"><a name="l00079"></a><span class="lineno">
    79</span>&#160;      PROC_THREAD_ATTRIBUTE_HANDLE_LIST,  <span class="comment">//
The attribute key to update in the</span></div><div class="line"><a name="l00080"></a><span
class="lineno">   80</span>&#160;                                          <span
class="comment">// attribute list.</span></div><div class="line"><a
name="l00081"></a><span class="lineno">   81</span>&#160;      <span
class="keyword">const_cast&lt;</span>PVOID*<span class="keyword">&gt;</span>(handles.data()),
<span class="comment">// Pointer to the attribute value.</span></div><div
class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;
     handles.size() * <span class="keyword">sizeof</span>(<a class="code" href="namespacerouting_1_1queueing_1_1ingress.html#a934208b6017d0a9aed90b6594bb8292f">HANDLE</a>),
   <span class="comment">// Size of the attribute value.</span></div><div
class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;
     <span class="keyword">nullptr</spa
 n>,                            <span class="comment">// Reserved and must be `nullptr`.</span></div><div
class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;
     <span class="keyword">nullptr</span>);                           <span
class="comment">// Reserved and must be `nullptr`.</span></div><div class="line"><a
name="l00085"></a><span class="lineno">   85</span>&#160;</div><div
class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;
 <span class="keywordflow">if</span> (result == FALSE) {</div><div class="line"><a
name="l00087"></a><span class="lineno">   87</span>&#160;    <span
class="keywordflow">return</span> <a class="code" href="classWindowsError.html">WindowsError</a>();</div><div
class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;
 }</div><div class="line"><a name="l00089"></a><span class="lineno">
  89</span>&#160;</div><div class="line"><a name="l00090"></a><span
class="lineno">   90</span>&#160;  <span clas
 s="keywordflow">return</span> attribute_list;</div><div class="line"><a
name="l00091"></a><span class="lineno">   91</span>&#160;}</div><div
class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div
class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;<span
class="comment">// This function enables or disables inheritance for a Windows file handle.</span></div><div
class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;<span
class="comment">//</span></div><div class="line"><a name="l00095"></a><span
class="lineno">   95</span>&#160;<span class="comment">// NOTE: By default,
handles on Windows are not inheritable, so this is</span></div><div class="line"><a
name="l00096"></a><span class="lineno">   96</span>&#160;<span
class="comment">// primarily used to enable inheritance when passing handles to child processes,</span></div><div
class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;<span
class="commen
 t">// and subsequently disable inheritance.</span></div><div class="line"><a
name="l00098"></a><span class="lineno"><a class="line" href="namespaceinternal_1_1windows.html#a9dc48dc50b21cb8cee5237630460c4bd">
  98</a></span>&#160;<span class="keyword">inline</span> <a
class="code" href="classTry.html">Try&lt;Nothing&gt;</a> <a class="code"
href="namespaceinternal_1_1windows.html#a9dc48dc50b21cb8cee5237630460c4bd">set_inherit</a>(<span
class="keyword">const</span> <a class="code" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a>&amp;
fd, <span class="keyword">const</span> <span class="keywordtype">bool</span>
inherit)</div><div class="line"><a name="l00099"></a><span class="lineno">
  99</span>&#160;{</div><div class="line"><a name="l00100"></a><span
class="lineno">  100</span>&#160;  <span class="keyword">const</span>
BOOL result = ::SetHandleInformation(</div><div class="line"><a name="l00101"></a><span
class="lineno">  101</span>&#160;      fd, HANDLE_FLAG_INHER
 IT, inherit ? HANDLE_FLAG_INHERIT : 0);</div><div class="line"><a name="l00102"></a><span
class="lineno">  102</span>&#160;</div><div class="line"><a name="l00103"></a><span
class="lineno">  103</span>&#160;  <span class="keywordflow">if</span>
(result == FALSE) {</div><div class="line"><a name="l00104"></a><span
class="lineno">  104</span>&#160;    <span class="keywordflow">return</span>
<a class="code" href="classWindowsError.html">WindowsError</a>();</div><div
class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;
 }</div><div class="line"><a name="l00106"></a><span class="lineno">
 106</span>&#160;</div><div class="line"><a name="l00107"></a><span
class="lineno">  107</span>&#160;  <span class="keywordflow">return</span>
<a class="code" href="structNothing.html">Nothing</a>();</div><div class="line"><a
name="l00108"></a><span class="lineno">  108</span>&#160;}</div><div
class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;</div><div
class="
 line"><a name="l00110"></a><span class="lineno">  110</span>&#160;}
<span class="comment">// namespace windows {</span></div><div class="line"><a
name="l00111"></a><span class="lineno">  111</span>&#160;} <span
class="comment">// namespace internal {</span></div><div class="line"><a
name="l00112"></a><span class="lineno">  112</span>&#160;</div><div
class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span
class="preprocessor">#endif // __STOUT_INTERNAL_WINDOWS_INHERIT_HPP__</span></div><div
class="ttc" id="namespaceinternal_1_1windows_html_afff48a941caf0e5c0334ca89116ad7d0"><div
class="ttname"><a href="namespaceinternal_1_1windows.html#afff48a941caf0e5c0334ca89116ad7d0">internal::windows::create_attributes_list_for_handles</a></div><div
class="ttdeci">Result&lt; std::shared_ptr&lt; AttributeList &gt; &gt; create_attributes_list_for_handles(const
std::vector&lt; HANDLE &gt; &amp;handles)</div><div class="ttdef"><b>Definition:</b>
inherit.hpp:32</div></div>
+<div class="ttc" id="structNothing_html"><div class="ttname"><a href="structNothing.html">Nothing</a></div><div
class="ttdef"><b>Definition:</b> nothing.hpp:16</div></div>
+<div class="ttc" id="namespaceos_1_1stat_html_a7a116891923bc8b5d8c50f78da8657be"><div
class="ttname"><a href="namespaceos_1_1stat.html#a7a116891923bc8b5d8c50f78da8657be">os::stat::size</a></div><div
class="ttdeci">Try&lt; Bytes &gt; size(const std::string &amp;path, const FollowSymlink
follow=FollowSymlink::FOLLOW_SYMLINK)</div><div class="ttdef"><b>Definition:</b>
stat.hpp:121</div></div>
 <div class="ttc" id="classTry_html"><div class="ttname"><a href="classTry.html">Try</a></div><div
class="ttdef"><b>Definition:</b> check.hpp:33</div></div>
 <div class="ttc" id="classWindowsError_html"><div class="ttname"><a href="classWindowsError.html">WindowsError</a></div><div
class="ttdef"><b>Definition:</b> error.hpp:108</div></div>
-<div class="ttc" id="namespaceinternal_1_1windows_html_a9dc48dc50b21cb8cee5237630460c4bd"><div
class="ttname"><a href="namespaceinternal_1_1windows.html#a9dc48dc50b21cb8cee5237630460c4bd">internal::windows::set_inherit</a></div><div
class="ttdeci">Try&lt; Nothing &gt; set_inherit(const int_fd &amp;fd, const
bool inherit)</div><div class="ttdef"><b>Definition:</b> inherit.hpp:31</div></div>
+<div class="ttc" id="namespaceinternal_1_1windows_html_a9dc48dc50b21cb8cee5237630460c4bd"><div
class="ttname"><a href="namespaceinternal_1_1windows.html#a9dc48dc50b21cb8cee5237630460c4bd">internal::windows::set_inherit</a></div><div
class="ttdeci">Try&lt; Nothing &gt; set_inherit(const int_fd &amp;fd, const
bool inherit)</div><div class="ttdef"><b>Definition:</b> inherit.hpp:98</div></div>
 <div class="ttc" id="3rdparty_2stout_2include_2stout_2windows_8hpp_html"><div class="ttname"><a
href="3rdparty_2stout_2include_2stout_2windows_8hpp.html">windows.hpp</a></div></div>
+<div class="ttc" id="classResult_html"><div class="ttname"><a href="classResult.html">Result</a></div><div
class="ttdef"><b>Definition:</b> check.hpp:30</div></div>
 <div class="ttc" id="nothing_8hpp_html"><div class="ttname"><a href="nothing_8hpp.html">nothing.hpp</a></div></div>
+<div class="ttc" id="namespacerouting_1_1queueing_1_1ingress_html_a934208b6017d0a9aed90b6594bb8292f"><div
class="ttname"><a href="namespacerouting_1_1queueing_1_1ingress.html#a934208b6017d0a9aed90b6594bb8292f">routing::queueing::ingress::HANDLE</a></div><div
class="ttdeci">constexpr Handle HANDLE</div><div class="ttdef"><b>Definition:</b>
ingress.hpp:37</div></div>
 <div class="ttc" id="error_8hpp_html"><div class="ttname"><a href="error_8hpp.html">error.hpp</a></div></div>
+<div class="ttc" id="structNone_html"><div class="ttname"><a href="structNone.html">None</a></div><div
class="ttdef"><b>Definition:</b> none.hpp:27</div></div>
 <div class="ttc" id="namespaceinternal_html"><div class="ttname"><a href="namespaceinternal.html">internal</a></div><div
class="ttdef"><b>Definition:</b> attributes.hpp:24</div></div>
 <div class="ttc" id="try_8hpp_html"><div class="ttname"><a href="try_8hpp.html">try.hpp</a></div></div>
 <div class="ttc" id="int__fd_8hpp_html"><div class="ttname"><a href="int__fd_8hpp.html">int_fd.hpp</a></div></div>
+<div class="ttc" id="namespaceinternal_1_1windows_html_a57ccac11227b87ed48b2798ebc1c5e04"><div
class="ttname"><a href="namespaceinternal_1_1windows.html#a57ccac11227b87ed48b2798ebc1c5e04">internal::windows::AttributeList</a></div><div
class="ttdeci">_PROC_THREAD_ATTRIBUTE_LIST AttributeList</div><div class="ttdef"><b>Definition:</b>
inherit.hpp:30</div></div>
 <div class="ttc" id="int__fd_8hpp_html_aea4dbda01c90455f158ffa9b924c2f07"><div class="ttname"><a
href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a></div><div
class="ttdeci">int int_fd</div><div class="ttdef"><b>Definition:</b>
int_fd.hpp:35</div></div>
 </div><!-- fragment --></div><!-- contents -->
 <!-- start footer part -->


Mime
View raw message