Author: jonpryor
Date: 2008-02-11 12:10:42 -0500 (Mon, 11 Feb 2008)
New Revision: 95453

Added:
   trunk/monodoc/class/Mono.Posix/en/Mono.Unix.Native/SignalAction.xml
   trunk/monodoc/class/Mono.Posix/en/Mono.Unix/UnixSignal.xml
Modified:
   trunk/monodoc/class/ChangeLog
   trunk/monodoc/class/Mono.Posix/en/Mono.Unix.Native/MountFlags.xml
   trunk/monodoc/class/Mono.Posix/en/Mono.Unix.Native/Signum.xml
   trunk/monodoc/class/Mono.Posix/en/Mono.Unix.Native/Stdlib.xml
   trunk/monodoc/class/Mono.Posix/en/index.xml
Log:
        * Mono.Posix/en/**: Flush UnixSignal & related additions.


Modified: trunk/monodoc/class/ChangeLog
===================================================================
--- trunk/monodoc/class/ChangeLog       2008-02-11 17:08:07 UTC (rev 95452)
+++ trunk/monodoc/class/ChangeLog       2008-02-11 17:10:42 UTC (rev 95453)
@@ -1,3 +1,7 @@
+2008-02-11  Jonathan Pryor  <[EMAIL PROTECTED]>
+
+       * Mono.Posix/en/**: Flush UnixSignal & related additions.
+
 2008-01-06  Jonathan Pryor  <[EMAIL PROTECTED]>
 
        * */en/**: Flush; monodocer output, plus removal of some monodocer 
warnings.

Added: trunk/monodoc/class/Mono.Posix/en/Mono.Unix/UnixSignal.xml
===================================================================
--- trunk/monodoc/class/Mono.Posix/en/Mono.Unix/UnixSignal.xml  2008-02-11 
17:08:07 UTC (rev 95452)
+++ trunk/monodoc/class/Mono.Posix/en/Mono.Unix/UnixSignal.xml  2008-02-11 
17:10:42 UTC (rev 95453)
@@ -0,0 +1,634 @@
+<Type Name="UnixSignal" FullName="Mono.Unix.UnixSignal">
+  <TypeSignature Language="C#" Value="public class UnixSignal : 
System.Threading.WaitHandle" />
+  <AssemblyInfo>
+    <AssemblyName>Mono.Posix</AssemblyName>
+    <AssemblyVersion>1.0.5000.0</AssemblyVersion>
+    <AssemblyVersion>2.0.0.0</AssemblyVersion>
+  </AssemblyInfo>
+  <ThreadingSafetyStatement>All public static members of this type are safe 
for multithreaded operations. No instance members are guaranteed to be thread 
safe.</ThreadingSafetyStatement>
+  <Base>
+    <BaseTypeName>System.Threading.WaitHandle</BaseTypeName>
+  </Base>
+  <Interfaces />
+  <Docs>
+    <summary>
+      Represents the number of times a Unix signal has been emitted.
+    </summary>
+    <remarks>
+      <para>
+        Unix signals are used (generally) for two things:
+      </para>    
+      <list type="bullet">
+        <item><term>
+          Asynchronous alerts about events that occur within a process, such 
as 
+          illegal instruction (<see cref="F:Mono.Unix.Native.Signum.SIGILL" 
/>),
+          floating point exception (<see 
cref="F:Mono.Unix.Native.Signum.SIGFPE" />),
+          bus error (<see cref="F:Mono.Unix.Native.Signum.SIGBUS" />),
+          invalid memory access (<see cref="F:Mono.Unix.Native.Signum.SIGSEGV" 
/>),
+          I/O is possible (<see cref="F:Mono.Unix.Native.Signum.SIGIO" />),
+          etc.
+        </term></item>
+        <item><term>
+          Asynchronous alerts of external "events", such as
+          termanal hangup (<see cref="F:Mono.Unix.Native.Signum.SIGHUP" />),
+          keyboard interrupt (<see cref="F:Mono.Unix.Native.Signum.SIGINT" />),
+          broken pipe (<see cref="F:Mono.Unix.Native.Signum.SIGPIPE" />),
+          program-defined actions 
+          (<see cref="F:Mono.Unix.Native.Signum.SIGUSR1" />,
+          <see cref="F:Mono.Unix.Native.Signum.SIGUSR2" />),
+          child exit (<see cref="F:Mono.Unix.Native.Signum.SIGCHLD" />),
+          etc.
+        </term></item>
+      </list>
+      <para>
+        The key nature about signals is that they are asynchronous.  In a
+        single threaded program, when a signal occurs the executing thread is
+        "hijacked" (no matter what it was previously doing) in order to
+        execute a (optionally registered) signal handler, and then the thread
+        resumes what it was previously doing (if possible; the signal handler
+        may abort the process as part of its execution).
+      </para>
+      <para>
+        In a multi-threaded program, a thread is selected at random among the
+        threads that can handle the signal, and that thread is hijacked to run
+        the signal handler before continuing (while the other threads continue
+        to execute in ignorance that a signal is occuring).
+      </para>
+      <para>
+        Tradtionally, <see cref="M:Mono.Unix.Native.Stdlib.signal" /> is used
+        to register a signal handler for a signal, and the registered handler
+        is invoked when the signal is generated.  However, due to the
+        "hijacking" nature of the signal handling process, what the signal
+        handler could do is <i>severely</i> restricted: it must not invoke
+        non-reentrant library functions, and can only modify global data and
+        execute a limited set of system calls such as 
+        <see cref="M:Mono.Unix.Native.Syscall.read" /> and
+        <see cref="M:Mono.Unix.Native.Syscall.write" />.
+      </para>
+      <para>
+        Managed code throws an additional wrench in the works, as the platform
+        invocation mechanism is neither reentrant nor signal safe. 
Consequently,
+        managed code <i>can not</i> be safely and reliably used as a signal
+        handler (as would traditionally be done with <c>signal</c>(2)), thus
+        the <see cref="T:Mono.Unix.UnixSignal" /> type.
+      </para>
+      <para>
+        A <see cref="T:Mono.Unix.UnixSignal" /> instance represents the number
+        of times that a Unix signal has been emitted.  That's all.
+        <c>UnixSignal</c> instances support:
+      </para>
+      <list type="bullet">
+        <item><term>
+          Accessing the number of times the Unix signal has been emitted via
+          the <see cref="P:Mono.Unix.UnixSignal.Count" />
+          and <see cref="P:Mono.Unix.UnixSignal.IsSet" /> properties.
+        </term></item>
+        <item><term>
+          Clearing the count with <see cref="M:Mono.Unix.UnixSignal.Reset" />.
+        </term></item>
+        <item><term>
+          Sleeping until a signal has been emitted via
+          <see cref="M:Mono.Unix.UnixSignal.WaitAny" /> and
+          <see cref="M:Mono.Unix.UnixSignal.WaitOne" />.
+        </term></item>
+      </list>
+      <para>
+        In order to operate, this class uses an internal unmanaged signal
+        handler to represent the count information.  Consequently, the count
+        will only be updated as long as no other mechanism is used to change
+        the registered signal handler, such as
+        <see cref="M:Mono.Unix.Native.Stdlib.signal" /> or
+        <see cref="M:Mono.Unix.Native.Stdlib.SetSignalAction" />.  If you use
+        <see cref="M:Mono.Unix.Native.Stdlib.signal" /> or
+        <see cref="M:Mono.Unix.Native.Stdlib.SetSignalAction" /> for the same
+        signal as a created <c>UnixSignal</c> instance, the UnixSignal
+        instance will stop operating as documented.  Don't Do That (TM).
+      </para>
+      <para>
+        There is currently a limit of 64 concurrent <c>UnixSignal</c>
+        instances within a process.
+      </para>
+    </remarks>
+  </Docs>
+  <Members>
+    <Member MemberName=".ctor">
+      <MemberSignature Language="C#" Value="public UnixSignal 
(Mono.Unix.Native.Signum signum);" />
+      <MemberType>Constructor</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
+        <AssemblyVersion>2.0.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <Parameters>
+        <Parameter Name="signum" Type="Mono.Unix.Native.Signum" />
+      </Parameters>
+      <Docs>
+        <param name="signum">
+          A <see cref="T:Mono.Unix.Native.Signum" /> value specifying which
+          Unix signal this instance should count.
+        </param>
+        <summary>
+          Creates and initializes a <see cref="T:Mono.Unix.UnixSignal" />
+          class instance.
+        </summary>
+        <remarks>
+          <para>
+            This constructor initializes the 
+            <see cref="P:Mono.Unix.UnixSignal.Signum" /> property of the new
+            instance using <paramref name="signum" />.
+          </para>
+          <para>
+            Once this constructor completes execution, all signal emissions
+            between the completion of the constructor and the invocation of
+            <see cref="M:System.Threading.WaitHandle.Close" /> will be
+            counted, updating the <see cref="M:Mono.Unix.UnixSignal.Count" />
+            property.
+          </para>
+        </remarks>
+        <exception cref="T:System.ArgumentException">
+          The internal signal handler could not be registered.
+        </exception>
+        <exception cref="T:System.ArgumentOutOfRangeException">
+          <paramref name="signum" /> is not a valid signal value.
+        </exception>
+      </Docs>
+    </Member>
+    <Member MemberName="Count">
+      <MemberSignature Language="C#" Value="public int Count { set; get; }" />
+      <MemberType>Property</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
+        <AssemblyVersion>2.0.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Int32</ReturnType>
+      </ReturnValue>
+      <Docs>
+        <summary>
+          The number of times the <see cref="P:Mono.Unix.UnixSignal.Signum" />
+          signal has been emitted since construction or the last call to
+          <see cref="M:Mono.Unix.UnixSignal.Reset" />.
+        </summary>
+        <value>
+          A <see cref="T:System.Int32" /> containing the number of the
+          of times the <see cref="P:Mono.Unix.UnixSignal.Signum" />
+          signal has been emitted.
+        </value>
+        <remarks>
+          To clear the count, either assign 0 to the 
+          <see cref="P:Mono.Unix.UnixSignal.Count" /> property or use 
+          <see cref="M:Mono.Unix.UnixSignal.Reset" />.
+        </remarks>
+        <exception cref="T:System.ObjectDisposedException">
+          The current instance has already been disposed.
+        </exception>
+      </Docs>
+    </Member>
+    <Member MemberName="Dispose">
+      <MemberSignature Language="C#" Value="protected override void Dispose 
(bool disposing);" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
+        <AssemblyVersion>2.0.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Void</ReturnType>
+      </ReturnValue>
+      <Parameters>
+        <Parameter Name="disposing" Type="System.Boolean" />
+      </Parameters>
+      <Docs>
+        <param name="disposing">
+          A <see cref="T:System.Boolean" />; if <see langword="true" />, then
+          this invocation is due to a 
+          <see cref="M:System.Threading.WaitHandle.Close" /> call; 
+          if <see langword="false" />, this invocation is from within the
+          finalizer.
+        </param>
+        <summary>
+          Cleanup all unmanaged resources.
+        </summary>
+        <remarks>
+          <block subset="none" type="behaviors">
+            This method releases all unmanaged resources held by the current
+            instance.  When <paramref name="disposing" /> is 
+            <see langword="true" />, this method releases all resources held
+            by any managed objects referenced by the current instance.  This
+            method invokes the <c>Dispose()</c> method of each referenced
+            object.
+          </block>
+          <block subset="none" type="overrides">
+            Override this mthod to dispose of resources allocated by types
+            derived from <see cref="T:Mono.Unix.UnixSignal" />.  When
+            overriding 
+            <see cref="M:Mono.Unix.UnixSignal.Dispose(System.Boolean)" />,
+            be careful not to reference objects that have been previously 
+            disposed an earlier call to <c>Dispose</c> or <c>Close</c>.  
+            <c>Dispose</c> can be called multiple times by other objects.
+          </block>
+          <block subset="none" type="usage">
+            This method is called by the protected
+            <see cref="M:System.Threading.WaitHandle.Dispose(System.Boolean)" 
/>
+            method and the <see cref="M:System.Object.Finalize" /> method.
+            <c>Dispose()</c> invokes this method with the 
+            <paramref name="disposing" /> parameter set to 
+            <see langword="true" />. 
+            <see cref="M:System.Object.Finalize" /> invokes 
+            <c>Dispose</c> with <paramref name="disposing" /> set to 
+            <see langword="false" />.
+          </block>
+        </remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="IsSet">
+      <MemberSignature Language="C#" Value="public bool IsSet { get; }" />
+      <MemberType>Property</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
+        <AssemblyVersion>2.0.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Boolean</ReturnType>
+      </ReturnValue>
+      <Docs>
+        <summary>
+          Returns <see langword="true" /> if 
+          <see cref="P:Mono.Unix.UnixSignal.Count" /> is greater than 0.
+        </summary>
+        <value>
+          A <see cref="T:System.Boolean" /> specifying whether or not 
+          <see cref="P:Mono.Unix.UnixSignal.Count" /> is greater than 0.
+        </value>
+        <remarks></remarks>
+        <exception cref="T:System.ObjectDisposedException">
+          The current instance has already been disposed.
+        </exception>
+      </Docs>
+    </Member>
+    <Member MemberName="Reset">
+      <MemberSignature Language="C#" Value="public bool Reset ();" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
+        <AssemblyVersion>2.0.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Boolean</ReturnType>
+      </ReturnValue>
+      <Parameters />
+      <Docs>
+        <summary>
+          Clears the <see cref="P:Mono.Unix.UnixSignal.Count" /> property; the
+          return value specifies whether or not 
+          <see cref="P:Mono.Unix.UnixSignal.Count" /> was not equal to 0
+          before it was cleared.
+        </summary>
+        <returns>
+          A <see cref="T:System.Boolean" /> specifying whether or not the 
+          <see cref="P:Mono.Unix.UnixSignal.Count" /> property was not equal
+          to 0 before it was cleared.  If <see langword="true" /> is returned,
+          <see cref="P:Mono.Unix.UnixSignal.Count" /> was not 0; if
+          <see langword="false" /> is returned, 
+          <see cref="P:Mono.Unix.UnixSignal.Count" /> was 0.
+        </returns>
+        <remarks>
+          <para>
+            This method atomically checks and clears the 
+            <see cref="P:Mono.Unix.UnixSignal.Count" /> property, and should
+            be preferred over manually checking and clearing the 
+            <see cref="P:Mono.Unix.UnixSignal.Count" /> property.
+          </para>
+        </remarks>
+        <exception cref="T:System.ObjectDisposedException">
+          The current instance has already been disposed.
+        </exception>
+      </Docs>
+    </Member>
+    <Member MemberName="Signum">
+      <MemberSignature Language="C#" Value="public Mono.Unix.Native.Signum 
Signum { get; }" />
+      <MemberType>Property</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
+        <AssemblyVersion>2.0.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>Mono.Unix.Native.Signum</ReturnType>
+      </ReturnValue>
+      <Docs>
+        <summary>The Unix signal this instance is counting.</summary>
+        <value>
+          A <see cref="T:Mono.Unix.Native.Signum" /> value specifying which
+          Unix signal this instance is counting.
+        </value>
+        <remarks>
+          <para>
+            This value is set in the 
+            <see cref="C:Mono.Unix.UnixSignal(Mono.Unix.Native.Signum)" />
+            constructor.
+          </para>
+        </remarks>
+        <exception cref="T:System.ObjectDisposedException">
+          The current instance has already been disposed.
+        </exception>
+      </Docs>
+    </Member>
+    <Member MemberName="WaitAny">
+      <MemberSignature Language="C#" Value="public static int WaitAny 
(Mono.Unix.UnixSignal[] signals);" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
+        <AssemblyVersion>2.0.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Int32</ReturnType>
+      </ReturnValue>
+      <Parameters>
+        <Parameter Name="signals" Type="Mono.Unix.UnixSignal[]" />
+      </Parameters>
+      <Docs>
+        <param name="signals">
+          A <see cref="T:Mono.Unix.UnixSignal" /> array containing the 
+          <see cref="T:Mono.Unix.UnixSignal" /> instances to wait on.
+        </param>
+        <summary>
+          Blocks the current thread until one of the 
+          <see cref="T:Mono.Unix.UnixSignal" /> instances within 
+          <paramref name="signals" /> has a non-zero 
+          <see cref="P:Mono.Unix.UnixSignal.Count" />.
+        </summary>
+        <returns>
+          Returns a <see cref="T:System.Int32" /> set to the index of the
+          element in <paramref name="signals" /> that received a signal.
+        </returns>
+        <remarks>
+          <para>
+            This method is equivalent to calling 
+            <c>UnixSignal.WaitAny(<paramref name="signals" />, -1)</c>.
+          </para>
+        </remarks>
+        <exception cref="T:System.ArgumentNullException">
+          <paramref name="signals" /> is <see langword="null" />.
+        </exception>
+        <exception cref="T:System.InvalidOperationException">
+          One of the <see cref="T:Mono.Unix.UnixSignal" /> instances within
+          <paramref name="signals" /> was disposed.
+        </exception>
+        <altmember 
cref="M:Mono.Unix.UnixSignal.WaitAny(Mono.Unix.UnixSignal[],System.Int32)" />
+      </Docs>
+    </Member>
+    <Member MemberName="WaitAny">
+      <MemberSignature Language="C#" Value="public static int WaitAny 
(Mono.Unix.UnixSignal[] signals, int millisecondsTimeout);" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
+        <AssemblyVersion>2.0.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Int32</ReturnType>
+      </ReturnValue>
+      <Parameters>
+        <Parameter Name="signals" Type="Mono.Unix.UnixSignal[]" />
+        <Parameter Name="millisecondsTimeout" Type="System.Int32" />
+      </Parameters>
+      <Docs>
+        <param name="signals">
+          A <see cref="T:Mono.Unix.UnixSignal" /> array containing the 
+          <see cref="T:Mono.Unix.UnixSignal" /> instances to wait on.
+        </param>
+        <param name="millisecondsTimeout">
+          A <see cref="T:System.Int32" /> specifying the number of
+          milliseconds to wait before the method should return.  <c>-1</c>
+          represents an infinite timeout.
+        </param>
+        <summary>
+          Blocks the current thread until one of the 
+          <see cref="T:Mono.Unix.UnixSignal" /> instances within 
+          <paramref name="signals" /> has a non-zero 
+          <see cref="P:Mono.Unix.UnixSignal.Count" /> or the timeout expires.
+        </summary>
+        <returns>
+          If the method doesn't timeout, returns a 
+          <see cref="T:System.Int32" /> set to the index of the
+          element in <paramref name="signals" /> that received a signal.
+          If the method does timeout, then 
+          <paramref name="millisecondsTimeout" /> is returned.
+        </returns>
+        <remarks></remarks>
+        <exception cref="T:System.ArgumentNullException">
+          <paramref name="signals" /> is <see langword="null" />.
+        </exception>
+        <exception cref="T:System.ArgumentOutOfRangeException">
+          <paramref name="millisecondsTimeout" /> is less than <c>-1</c>.
+        </exception>
+        <exception cref="T:System.InvalidOperationException">
+          One of the <see cref="T:Mono.Unix.UnixSignal" /> instances within
+          <paramref name="signals" /> was disposed.
+        </exception>
+      </Docs>
+    </Member>
+    <Member MemberName="WaitAny">
+      <MemberSignature Language="C#" Value="public static int WaitAny 
(Mono.Unix.UnixSignal[] signals, TimeSpan timeout);" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
+        <AssemblyVersion>2.0.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Int32</ReturnType>
+      </ReturnValue>
+      <Parameters>
+        <Parameter Name="signals" Type="Mono.Unix.UnixSignal[]" />
+        <Parameter Name="timeout" Type="System.TimeSpan" />
+      </Parameters>
+      <Docs>
+        <param name="signals">
+          A <see cref="T:Mono.Unix.UnixSignal" /> array containing the 
+          <see cref="T:Mono.Unix.UnixSignal" /> instances to wait on.
+        </param>
+        <param name="timeout">
+          A <see cref="T:System.TimeSpan" /> specifying how long the method
+          should wait before returning.  Use a <see cref="T:System.TimeSpan" />
+          with a <see cref="P:System.TimeSpan.TotalMilliseconds" /> value of
+          <c>-1</c> for an infinite timeout.
+        </param>
+        <summary>
+          Blocks the current thread until one of the 
+          <see cref="T:Mono.Unix.UnixSignal" /> instances within 
+          <paramref name="signals" /> has a non-zero 
+          <see cref="P:Mono.Unix.UnixSignal.Count" /> or the timeout expires.
+        </summary>
+        <returns>
+          If the method doesn't timeout, returns a 
+          <see cref="T:System.Int32" /> set to the index of the
+          element in <paramref name="signals" /> that received a signal.
+          If the method does timeout, then <paramref name="timeout" />'s 
+          <see cref="P:System.TimeSpan.TotalMilliseconds" /> value cast to a
+          <see cref="T:System.Int32" /> is returned.
+        </returns>
+        <remarks>
+          <para>
+            This is equivalent to 
+            <c>UnixSignal.WaitAny(<paramref name="signals" />,
+            timeout.TotalMilliseconds)</c>.
+          </para>
+        </remarks>
+        <exception cref="T:System.ArgumentNullException">
+          <paramref name="signals" /> is <see langword="null" />.
+        </exception>
+        <exception cref="T:System.ArgumentOutOfRangeException">
+          <paramref name="timeout" />'s 
+          <see cref="P:System.TimeSpan.TotalMilliseconds" /> property is less
+          than <c>-1</c> or greater than <see cref="F:System.Int32.MaxValue" 
/>.
+        </exception>
+        <exception cref="T:System.InvalidOperationException">
+          One of the <see cref="T:Mono.Unix.UnixSignal" /> instances within
+          <paramref name="signals" /> was disposed.
+        </exception>
+      </Docs>
+    </Member>
+    <Member MemberName="WaitOne">
+      <MemberSignature Language="C#" Value="public override bool WaitOne ();" 
/>
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
+        <AssemblyVersion>2.0.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Boolean</ReturnType>
+      </ReturnValue>
+      <Parameters />
+      <Docs>
+        <summary>
+          Blocks the current thread until the curent instance has a non-zero 
+          <see cref="P:Mono.Unix.UnixSignal.Count" />.
+        </summary>
+        <returns>
+          Returns <see langword="true" /> when the current instance receives a
+          signal.
+        </returns>
+        <remarks>
+          <para>
+            The caller of this method blocks indefinitely until the
+            <see cref="P:Mono.Unix.UnixSignal.Signum" /> signal is received by
+            the current process and the 
+            <see cref="P:Mono.Unix.UnixSignal.Count" /> property is non-zero.
+          </para>
+          <para>
+            This method is equivalent to calling <c>WaitOne(-1)</c>.
+          </para>
+        </remarks>
+        <exception cref="T:System.ObjectDisposedException">
+          The current instance has already been disposed.
+        </exception>
+        <altmember cref="M:Mono.Unix.UnixSignal.WaitOne(System.Int32)" />
+      </Docs>
+    </Member>
+    <Member MemberName="WaitOne">
+      <MemberSignature Language="C#" Value="public override bool WaitOne (int 
millisecondsTimeout, bool exitContext);" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
+        <AssemblyVersion>2.0.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Boolean</ReturnType>
+      </ReturnValue>
+      <Parameters>
+        <Parameter Name="millisecondsTimeout" Type="System.Int32" />
+        <Parameter Name="exitContext" Type="System.Boolean" />
+      </Parameters>
+      <Docs>
+        <param name="millisecondsTimeout">
+          A <see cref="T:System.Int32" /> containing the maximum number of
+          milliseconds the current thread should block before returning.
+        </param>
+        <param name="exitContext">
+          This parameter must be <see langword="false" />.
+        </param>
+        <summary>
+          Blocks the current thread until the curent instance has a non-zero 
+          <see cref="P:Mono.Unix.UnixSignal.Count" /> or the timeout expires.
+        </summary>
+        <returns>
+          Returns <see langword="true" /> when the current instance receives a
+          signal, otherwise <see langword="false" /> is returned if the
+          timeout is exceeded.
+        </returns>
+        <remarks>
+          <para>
+            The caller of this method blocks for up to 
+            <paramref name="millisecondsTimeout" /> for the 
+            <see cref="P:Mono.Unix.UnixSignal.Signum" /> signal to be received 
+            by the current process and the 
+            <see cref="P:Mono.Unix.UnixSignal.Count" /> property to become 
+            non-zero.
+          </para>
+        </remarks>
+        <exception cref="T:System.ArgumentOutOfRangeException">
+          <paramref name="millisecondsTimeout" /> is less than <c>-1</c>.
+        </exception>
+        <exception cref="T:System.InvalidOperationException">
+          <paramref name="exitContext" /> is <see langword="true" />.
+        </exception>
+        <exception cref="T:System.ObjectDisposedException">
+          The current instance has already been disposed.
+        </exception>
+      </Docs>
+    </Member>
+    <Member MemberName="WaitOne">
+      <MemberSignature Language="C#" Value="public override bool WaitOne 
(TimeSpan timeout, bool exitContext);" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
+        <AssemblyVersion>2.0.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Boolean</ReturnType>
+      </ReturnValue>
+      <Parameters>
+        <Parameter Name="timeout" Type="System.TimeSpan" />
+        <Parameter Name="exitContext" Type="System.Boolean" />
+      </Parameters>
+      <Docs>
+        <param name="timeout">
+          A <see cref="T:System.TimeSpan" /> specifying how long the method
+          should wait before returning.  Use a <see cref="T:System.TimeSpan" />
+          with a <see cref="P:System.TimeSpan.TotalMilliseconds" /> value of
+          <c>-1</c> for an infinite timeout.
+        </param>
+        <param name="exitContext">
+          This parameter must be <see langword="false" />.
+        </param>
+        <summary>
+          Blocks the current thread until the curent instance has a non-zero 
+          <see cref="P:Mono.Unix.UnixSignal.Count" /> or the timeout expires.
+        </summary>
+        <returns>
+          Returns <see langword="true" /> when the current instance receives a
+          signal, otherwise <see langword="false" /> is returned if the
+          timeout is exceeded.
+        </returns>
+        <remarks>
+          <para>
+            The caller of this method blocks for up to 
+            <c>timeout.TotalMilliseconds</c> milliseconds for the
+            <see cref="P:Mono.Unix.UnixSignal.Signum" /> signal to be received 
+            by the current process and the 
+            <see cref="P:Mono.Unix.UnixSignal.Count" /> property to become 
+            non-zero.
+          </para>
+        </remarks>
+        <exception cref="T:System.ArgumentOutOfRangeException">
+          <paramref name="timeout" />'s 
+          <see cref="P:System.TimeSpan.TotalMilliseconds" /> property is less
+          than <c>-1</c> or greater than <see cref="F:System.Int32.MaxValue" 
/>.
+        </exception>
+        <exception cref="T:System.InvalidOperationException">
+          <paramref name="exitContext" /> is <see langword="true" />.
+        </exception>
+        <exception cref="T:System.ObjectDisposedException">
+          The current instance has already been disposed.
+        </exception>
+      </Docs>
+    </Member>
+  </Members>
+</Type>

Modified: trunk/monodoc/class/Mono.Posix/en/Mono.Unix.Native/MountFlags.xml
===================================================================
--- trunk/monodoc/class/Mono.Posix/en/Mono.Unix.Native/MountFlags.xml   
2008-02-11 17:08:07 UTC (rev 95452)
+++ trunk/monodoc/class/Mono.Posix/en/Mono.Unix.Native/MountFlags.xml   
2008-02-11 17:10:42 UTC (rev 95453)
@@ -38,6 +38,20 @@
         <AssemblyVersion>2.0.0.0</AssemblyVersion>
       </AssemblyInfo>
     </Member>
+    <Member MemberName="ST_BIND">
+      <MemberSignature Language="C#" Value="ST_BIND" />
+      <MemberType>Field</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
+        <AssemblyVersion>2.0.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>Mono.Unix.Native.MountFlags</ReturnType>
+      </ReturnValue>
+      <Docs>
+        <summary>To be added.</summary>
+      </Docs>
+    </Member>
     <Member MemberName="ST_IMMUTABLE">
       <MemberSignature Language="C#" Value="ST_IMMUTABLE" />
       <MemberType>Field</MemberType>
@@ -108,6 +122,20 @@
         <AssemblyVersion>2.0.0.0</AssemblyVersion>
       </AssemblyInfo>
     </Member>
+    <Member MemberName="ST_NOEXEC">
+      <MemberSignature Language="C#" Value="ST_NOEXEC" />
+      <MemberType>Field</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
+        <AssemblyVersion>2.0.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>Mono.Unix.Native.MountFlags</ReturnType>
+      </ReturnValue>
+      <Docs>
+        <summary>To be added.</summary>
+      </Docs>
+    </Member>
     <Member MemberName="ST_NOSUID">
       <MemberSignature Language="C#" Value="ST_NOSUID" />
       <MemberType>Field</MemberType>
@@ -140,6 +168,20 @@
         <AssemblyVersion>2.0.0.0</AssemblyVersion>
       </AssemblyInfo>
     </Member>
+    <Member MemberName="ST_REMOUNT">
+      <MemberSignature Language="C#" Value="ST_REMOUNT" />
+      <MemberType>Field</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
+        <AssemblyVersion>2.0.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>Mono.Unix.Native.MountFlags</ReturnType>
+      </ReturnValue>
+      <Docs>
+        <summary>To be added.</summary>
+      </Docs>
+    </Member>
     <Member MemberName="ST_SYNCHRONOUS">
       <MemberSignature Language="C#" Value="ST_SYNCHRONOUS" />
       <MemberType>Field</MemberType>

Added: trunk/monodoc/class/Mono.Posix/en/Mono.Unix.Native/SignalAction.xml
===================================================================
--- trunk/monodoc/class/Mono.Posix/en/Mono.Unix.Native/SignalAction.xml 
2008-02-11 17:08:07 UTC (rev 95452)
+++ trunk/monodoc/class/Mono.Posix/en/Mono.Unix.Native/SignalAction.xml 
2008-02-11 17:10:42 UTC (rev 95453)
@@ -0,0 +1,69 @@
+<Type Name="SignalAction" FullName="Mono.Unix.Native.SignalAction">
+  <TypeSignature Language="C#" Value="public enum SignalAction" />
+  <AssemblyInfo>
+    <AssemblyName>Mono.Posix</AssemblyName>
+    <AssemblyVersion>1.0.5000.0</AssemblyVersion>
+    <AssemblyVersion>2.0.0.0</AssemblyVersion>
+  </AssemblyInfo>
+  <Base>
+    <BaseTypeName>System.Enum</BaseTypeName>
+  </Base>
+  <Docs>
+    <summary>
+      The set of actions to perform on receipt of a Unix signal.
+    </summary>
+    <remarks></remarks>
+    <altmember cref="M:Mono.Unix.Native.Stdlib.SetSignalAction" />
+  </Docs>
+  <Members>
+    <Member MemberName="Default">
+      <MemberSignature Language="C#" Value="Default" />
+      <MemberType>Field</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
+        <AssemblyVersion>2.0.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>Mono.Unix.Native.SignalAction</ReturnType>
+      </ReturnValue>
+      <Docs>
+        <summary>
+          The default action should be performed when the signal
+          is received.
+                               </summary>
+      </Docs>
+    </Member>
+    <Member MemberName="Error">
+      <MemberSignature Language="C#" Value="Error" />
+      <MemberType>Field</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
+        <AssemblyVersion>2.0.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>Mono.Unix.Native.SignalAction</ReturnType>
+      </ReturnValue>
+      <Docs>
+        <summary>
+          An error should be generated when the signal is received.
+        </summary>
+      </Docs>
+    </Member>
+    <Member MemberName="Ignore">
+      <MemberSignature Language="C#" Value="Ignore" />
+      <MemberType>Field</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
+        <AssemblyVersion>2.0.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>Mono.Unix.Native.SignalAction</ReturnType>
+      </ReturnValue>
+      <Docs>
+        <summary>
+          The signal should be ignored.
+        </summary>
+      </Docs>
+    </Member>
+  </Members>
+</Type>

Modified: trunk/monodoc/class/Mono.Posix/en/Mono.Unix.Native/Signum.xml
===================================================================
--- trunk/monodoc/class/Mono.Posix/en/Mono.Unix.Native/Signum.xml       
2008-02-11 17:08:07 UTC (rev 95452)
+++ trunk/monodoc/class/Mono.Posix/en/Mono.Unix.Native/Signum.xml       
2008-02-11 17:10:42 UTC (rev 95453)
@@ -14,6 +14,7 @@
       <para>Do 'man 7 signal' for more information. Some signals here are not 
posix.1 standard. See also Stdlib.signal() for more information. </para>
       <para>Not all signals are available on all platforms.</para>
     </remarks>
+    <altmember cref="T:Mono.Unix.UnixSignal" />
     <altmember cref="M:Mono.Unix.Native.Stdlib.raise" />
     <altmember cref="M:Mono.Unix.Native.Stdlib.signal" />
     <altmember cref="M:Mono.Unix.Native.Syscall.kill" />

Modified: trunk/monodoc/class/Mono.Posix/en/Mono.Unix.Native/Stdlib.xml
===================================================================
--- trunk/monodoc/class/Mono.Posix/en/Mono.Unix.Native/Stdlib.xml       
2008-02-11 17:08:07 UTC (rev 95452)
+++ trunk/monodoc/class/Mono.Posix/en/Mono.Unix.Native/Stdlib.xml       
2008-02-11 17:10:42 UTC (rev 95453)
@@ -2310,6 +2310,96 @@
         <AssemblyVersion>2.0.0.0</AssemblyVersion>
       </AssemblyInfo>
     </Member>
+    <Member MemberName="SetSignalAction">
+      <MemberSignature Language="C#" Value="public static int SetSignalAction 
(Mono.Unix.Native.Signum signal, Mono.Unix.Native.SignalAction action);" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
+        <AssemblyVersion>2.0.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Int32</ReturnType>
+      </ReturnValue>
+      <Parameters>
+        <Parameter Name="signal" Type="Mono.Unix.Native.Signum" />
+        <Parameter Name="action" Type="Mono.Unix.Native.SignalAction" />
+      </Parameters>
+      <Docs>
+        <param name="signum">
+          A <see cref="T:Mono.Unix.Native.Signum" /> specifying the 
+          signal to handle.
+        </param>
+        <param name="action">
+          A <see cref="T:Mono.Unix.Native.SignalAction" /> specifying what to
+          do when the <paramref name="signum" /> signal is emitted.
+        </param>
+        <summary>
+          Specifies what should happen when a signal is emitted.
+        </summary>
+        <returns>
+          <para>
+            A <see cref="T:System.Int32" />; if equal to <c>0</c>, the call
+            was successful.  <c>-1</c> is returned on failure, and sets 
+            <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
+            to indicate the error.
+          </para>
+          <block subset="none" type="usage">
+            <para>
+              Possible errors include:
+            </para>
+            <list type="table">
+              <listheader>
+                <term>
+                  Error
+                </term>
+                <description>
+                  Details
+                </description>
+              </listheader>
+              <item>
+                <term>
+                  <see cref="F:Mono.Unix.Native.Errno.EINVAL" />
+                </term>
+                <description>
+                  <para>
+                    <paramref name="signum" /> is invalid.
+                  </para>
+                </description>
+              </item>
+            </list>
+          </block>
+        </returns>
+        <remarks>
+          <para>
+            This is the safer, restricted form of 
+            <see 
cref="M:Mono.Unix.Native.Stdlib.signal(Mono.Unix.Native.Signum,Mono.Unix.Native.SignalHandler)"
 />.
+            While <c>signal</c>(2) permits an arbitrary method to be set as
+            the signal handler, this method permits specifying only the
+            default, ignore, or error handlers.
+          </para>
+          <block subset="none" type="behaviors">
+            <para>
+              If <paramref name="action" /> is
+              <see cref="F:Mono.Unix.Native.SignalAction.Default" />, then
+              this method is equivalent to 
+              <c>signal(<paramref name="signum" />, SIG_DFL)</c>.
+            </para>
+            <para>
+              If <paramref name="action" /> is
+              <see cref="F:Mono.Unix.Native.SignalAction.Ignore" />, then
+              this method is equivalent to 
+              <c>signal(<paramref name="signum" />, SIG_IGN)</c>.
+            </para>
+            <para>
+              If <paramref name="action" /> is
+              <see cref="F:Mono.Unix.Native.SignalAction.Error" />, then
+              this method is equivalent to 
+              <c>signal(<paramref name="signum" />, SIG_ERR)</c>.
+            </para>
+          </block>
+        </remarks>
+      </Docs>
+    </Member>
     <Member MemberName="setvbuf">
       <MemberSignature Language="C#" Value="public static int setvbuf (IntPtr 
stream, byte* buf, int mode, ulong size);" />
       <MemberType>Method</MemberType>
@@ -2539,6 +2629,18 @@
           </block>
         </returns>
         <remarks>
+          <block subset="none" type="note">
+            <para>
+              This method should not be used in new code, as the Platform 
Invoke
+              mechanism is not signal-safe, yet the Platform Invoke mechanism 
is
+              required for unmanaged code to invoke managed code.
+            </para>
+            <para>
+              New code should use the replacement method
+              <see cref="M:Mono.Unix.Native.Stdlib.SetSignalAction" /> or the
+              type <see cref="T:Mono.Unix.UnixSignal" />.
+            </para>
+          </block>
           <para>This signal() facility is a simplified interface to the more 
general <see cref="M:Mono.Unix.Native.Syscall.sigaction" />(2) facility.</para>
           <para>Signals allow the manipulation of a process from outside its 
domain as well as allowing the process to manipulate itself or copies of itself 
(children).  There are two general types of signals: those that cause 
termination of a process and those that do not.  Signals which cause 
termination of a program might result from an irrecoverable error or might be 
the result of a user at a terminal typing the 'interrupt' character.  Signals 
are used when a process is stopped because it wishes to access its control 
terminal while in the background (see <c>tty</c>(4)).  Signals are optionally 
generated when a process resumes after being stopped, when the status of child 
processes changes, or when input is ready at the control terminal.  Most 
signals result in the termination of the process receiving them if no action is 
taken; some signals instead cause the process receiving them to be stopped, or 
are simply discarded if the process has not requested otherwise. Except f
 or the <see cref="F:Mono.Unix.Native.Signum.SIGKILL" /> and <see 
cref="F:Mono.Unix.Native.Signum.SIGSTOP" /> signals, the <c>signal</c>() 
function allows for a signal to be caught, to be ignored, or to generate an 
interrupt.
 </para>
@@ -2553,6 +2655,8 @@
           <para>If a process explicitly specifies <see 
cref="F:Mono.Unix.Native.Stdlib.SIG_IGN" /> as the action for the signal <see 
cref="F:Mono.Unix.Native.Stdlib.SIGCHLD" />, the system will not create zombie 
processes when children of the calling process exit.  As a consequence, the 
system will discard the exit status from the child processes.  If the calling 
process subsequently issues a call to <see 
cref="M:Mono.Unix.Native.Syscall.wait" />(2) or equivalent, it will block until 
all of the calling process's children terminate, and then return a value of -1 
with <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> returning <see 
cref="F:Mono.Unix.Native.Errno.ECHILD" />.
 </para>
         </remarks>
+        <altmember cref="M:Mono.Unix.Native.Stdlib.SetSignalAction" />
+        <altmember cref="T:Mono.Unix.UnixSignal" />
       </Docs>
       <AssemblyInfo>
         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
@@ -2560,6 +2664,9 @@
       </AssemblyInfo>
       <Attributes>
         <Attribute>
+          <AttributeName>System.Obsolete("This is not safe; use 
Mono.Unix.UnixSignal for signal delivery or SetSignalAction()")</AttributeName>
+        </Attribute>
+        <Attribute>
           <AttributeName>System.CLSCompliant(false)</AttributeName>
         </Attribute>
       </Attributes>

Modified: trunk/monodoc/class/Mono.Posix/en/index.xml
===================================================================
--- trunk/monodoc/class/Mono.Posix/en/index.xml 2008-02-11 17:08:07 UTC (rev 
95452)
+++ trunk/monodoc/class/Mono.Posix/en/index.xml 2008-02-11 17:10:42 UTC (rev 
95453)
@@ -48,6 +48,7 @@
       <Type Name="UnixPath" />
       <Type Name="UnixPipes" />
       <Type Name="UnixProcess" />
+      <Type Name="UnixSignal" />
       <Type Name="UnixStream" />
       <Type Name="UnixSymbolicLinkInfo" />
       <Type Name="UnixUserInfo" />
@@ -82,6 +83,7 @@
       <Type Name="PosixFadviseAdvice" />
       <Type Name="PosixMadviseAdvice" />
       <Type Name="SeekFlags" />
+      <Type Name="SignalAction" />
       <Type Name="SignalHandler" />
       <Type Name="Signum" />
       <Type Name="Stat" />

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to