a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
66 lines
3.4 KiB
XML
66 lines
3.4 KiB
XML
<Namespace Name="Mono.Unix">
|
|
<Docs>
|
|
<summary>High-level Unix wrapper types.</summary>
|
|
<remarks>
|
|
<para>The Mono.Unix namespace contains
|
|
high-level wrapper classes, which provide .NET naming and
|
|
usage conventions over the low-level
|
|
<see cref="T:Mono.Unix.Native.Syscall" /> and
|
|
<see cref="T:Mono.Unix.Native.Stdlib" /> functionality.
|
|
</para>
|
|
<para>
|
|
If an exception is generated due to an operating system-level error
|
|
(as opposed to invalid arguments or some fully managed reason), the
|
|
exception thrown will either inherit from
|
|
<see cref="T:Mono.Unix.UnixIOException"/>, or the
|
|
<see cref="P:System.Exception.InnerException"/> property will be a
|
|
type inheriting from <c>UnixIOException</c>. In either case, the
|
|
<see cref="P:Mono.Unix.UnixIOException.ErrorCode"/> property will
|
|
contain the underlying error number that generated the exception.
|
|
This error number can be used to look up additional information if
|
|
necessary.
|
|
</para>
|
|
<block subset="none" type="note">
|
|
<para>Thread-safety wasn't considered in the original Unix API. While
|
|
some degree of thread-safety is provided from managed code, it is
|
|
impossible to provide full thread-safety for interactions between
|
|
managed and unmanaged code. For example, if you DllImport into a C
|
|
library which uses non-thread-safe Unix functions which are also
|
|
exposed in Mono.Unix, you may have threading issues including, but not
|
|
limited to, memory corruption.</para>
|
|
<para>An effort is made to provide thread-safety from managed code,
|
|
but it is impossible to know all dependencies for all potential
|
|
Unix-like platforms. For example, is <see
|
|
cref="M:Mono.Unix.Native.Stdlib.fopen"/> thread-safe? It appears to be under
|
|
glibc, but isn't necessarily under all Unix platforms.
|
|
<c>Mono.Unix.Native.Stdlib</c> assumes that it is. Only <i>obviously</i>
|
|
unsafe exports are actually synchronized from managed code, such as
|
|
<see cref="M:Mono.Unix.Native.Stdlib.tmpnam"/> and
|
|
<see cref="M:Mono.Unix.Native.Stdlib.strerror"/>.</para>
|
|
</block>
|
|
<para>Documentation is based upon the FreeBSD man pages, which is under the
|
|
following copyright:</para>
|
|
<example><code lang="FreeBSD Copyright">
|
|
Copyright (c) 1980, 1983, 1986, 1991, 1993
|
|
The Regents of the University of California. All rights reserved.
|
|
|
|
Redistribution and use in source and binary forms, with or without
|
|
modification, are permitted provided that the following conditions
|
|
are met:
|
|
1. Redistributions of source code must retain the above copyright
|
|
notice, this list of conditions and the following disclaimer.
|
|
2. Redistributions in binary form must reproduce the above copyright
|
|
notice, this list of conditions and the following disclaimer in the
|
|
documentation and/or other materials provided with the distribution.
|
|
3. All advertising materials mentioning features or use of this software
|
|
must display the following acknowledgement:
|
|
This product includes software developed by the University of
|
|
California, Berkeley and its contributors.
|
|
4. Neither the name of the University nor the names of its contributors
|
|
may be used to endorse or promote products derived from this software
|
|
without specific prior written permission.
|
|
</code></example>
|
|
</remarks>
|
|
</Docs>
|
|
</Namespace>
|