1 <Type Name="UnixEnvironment" FullName="Mono.Unix.UnixEnvironment">
2 <TypeSignature Language="C#" Value="public sealed class UnixEnvironment" />
3 <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit UnixEnvironment extends System.Object" />
5 <AssemblyName>Mono.Posix</AssemblyName>
6 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
7 <AssemblyVersion>2.0.0.0</AssemblyVersion>
8 <AssemblyVersion>4.0.0.0</AssemblyVersion>
10 <ThreadingSafetyStatement>This type is safe for multithreaded operations.</ThreadingSafetyStatement>
12 <BaseTypeName>System.Object</BaseTypeName>
16 <summary>Provides the current settings for, and information about, the
17 execution environment.</summary>
20 Use this class to retrieve the following information:
25 User and Group information
35 Process group creation
40 Configuration value lookup
45 Supplementary group information
52 <Member MemberName="CreateSession">
53 <MemberSignature Language="C#" Value="public static int CreateSession ();" />
54 <MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 CreateSession() cil managed" />
55 <MemberType>Method</MemberType>
57 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
58 <AssemblyVersion>2.0.0.0</AssemblyVersion>
59 <AssemblyVersion>4.0.0.0</AssemblyVersion>
62 <ReturnType>System.Int32</ReturnType>
66 <summary>Create a new session.</summary>
68 A <see cref="T:System.Int32" /> containing the return value of the
69 <see cref="M:Mono.Unix.Native.Syscall.setsid" /> call. This can be
70 ignored, since it will be translated into an exception if it's an
75 This method creates a new session. The calling process is the
76 session leader of the new session, is the process group leader of
77 a new process group and has no controlling terminal. The calling
78 process is the only process in either the session or the process
82 <exception cref="System.InvalidOperationException">
84 The calling process is already a process group leader, or the
85 process group ID of a process other than the calling process
86 matches the process ID of the calling process.
87 [<see cref="F:Mono.Unix.Native.Errno.EPERM" />]
90 <altmember cref="M:Mono.Unix.Native.Syscall.setsid" />
93 <Member MemberName="CurrentDirectory">
94 <MemberSignature Language="C#" Value="public static string CurrentDirectory { get; set; }" />
95 <MemberSignature Language="ILAsm" Value=".property string CurrentDirectory" />
96 <MemberType>Property</MemberType>
98 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
99 <AssemblyVersion>2.0.0.0</AssemblyVersion>
100 <AssemblyVersion>4.0.0.0</AssemblyVersion>
103 <ReturnType>System.String</ReturnType>
106 <summary>Gets or sets the current directory of the process.</summary>
108 A <see cref="T:System.String" /> containing the current directory of
112 <para>The <paramref name="value" /> argument is permitted to specify
113 relative or absolute path information. Relative path information is
114 interpreted as relative to the current working directory.
115 <block subset="none" type="note">To obtain the current working
117 <see cref="M:Mono.Unix.UnixDirectoryInfo.GetCurrentDirectory" qualify="true" />.
120 <exception cref="T:System.UnauthorizedAccessException">
121 Permission to read or search a component of the current working
122 directory was denied.
123 [<see cref="F:Mono.Unix.Native.Errno.EACCESS" />]
125 <exception cref="T:System.IO.FileNotFoundException">
126 The current working directory has been unlinked.
127 [<see cref="F:Mono.Unix.Native.Errno.ENOENT" />]
129 <altmember cref="M:Mono.Unix.UnixDirectoryInfo.GetCurrentDirectory" />
130 <altmember cref="M:Mono.Unix.UnixDirectoryInfo.SetCurrentDirectory" />
133 <Member MemberName="EffectiveGroup">
134 <MemberSignature Language="C#" Value="public static Mono.Unix.UnixGroupInfo EffectiveGroup { get; set; }" />
135 <MemberSignature Language="ILAsm" Value=".property class Mono.Unix.UnixGroupInfo EffectiveGroup" />
136 <MemberType>Property</MemberType>
138 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
139 <AssemblyVersion>2.0.0.0</AssemblyVersion>
140 <AssemblyVersion>4.0.0.0</AssemblyVersion>
143 <ReturnType>Mono.Unix.UnixGroupInfo</ReturnType>
146 <summary>Gets information about the effective group of the process.</summary>
148 A <see cref="T:Mono.Unix.UnixGroupInfo" /> containing information
149 about the effective group of the process.
154 <see cref="P:Mono.Unix.UnixEnvironment.EffectiveGroup" />
155 gives the process additional permissions during the execution of
156 <see cref="F:Mono.Unix.FileSpecialAttributes.SetGroupId" />
160 <altmember cref="M:Mono.Unix.UnixEnvironment.EffectiveUser" />
161 <altmember cref="M:Mono.Unix.UnixEnvironment.RealGroup" />
162 <altmember cref="M:Mono.Unix.UnixEnvironment.RealUser" />
163 <altmember cref="M:Mono.Unix.Native.Syscall.getegid" />
166 <Member MemberName="EffectiveGroupId">
167 <MemberSignature Language="C#" Value="public static long EffectiveGroupId { get; set; }" />
168 <MemberSignature Language="ILAsm" Value=".property int64 EffectiveGroupId" />
169 <MemberType>Property</MemberType>
171 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
172 <AssemblyVersion>2.0.0.0</AssemblyVersion>
173 <AssemblyVersion>4.0.0.0</AssemblyVersion>
176 <ReturnType>System.Int64</ReturnType>
179 <summary>Gets the effective group ID of the process.</summary>
181 A <see cref="T:System.Int64" /> containing nthe effective group ID
187 <see cref="P:Mono.Unix.UnixEnvironment.EffectiveGroupId" />
188 gives the process additional permissions during the execution of
189 <see cref="F:Mono.Unix.FileSpecialAttributes.SetGroupId" />
193 <altmember cref="M:Mono.Unix.UnixEnvironment.EffectiveUserId" />
194 <altmember cref="M:Mono.Unix.UnixEnvironment.RealGroupId" />
195 <altmember cref="M:Mono.Unix.UnixEnvironment.RealUserId" />
196 <altmember cref="M:Mono.Unix.Native.Syscall.getegid" />
199 <Member MemberName="EffectiveUser">
200 <MemberSignature Language="C#" Value="public static Mono.Unix.UnixUserInfo EffectiveUser { get; set; }" />
201 <MemberSignature Language="ILAsm" Value=".property class Mono.Unix.UnixUserInfo EffectiveUser" />
202 <MemberType>Property</MemberType>
204 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
205 <AssemblyVersion>2.0.0.0</AssemblyVersion>
206 <AssemblyVersion>4.0.0.0</AssemblyVersion>
209 <ReturnType>Mono.Unix.UnixUserInfo</ReturnType>
212 <summary>Gets information about the effective user of the process.</summary>
214 A <see cref="T:Mono.Unix.UnixUserInfo" /> containing information
215 about the effective user of the process.
220 <see cref="P:Mono.Unix.UnixEnvironment.EffectiveUser" /> gives
221 the process additional permissions during execution of
222 <see cref="F:Mono.Unix.FileSpecialAttributes.SetUserId" />
226 <altmember cref="M:Mono.Unix.UnixEnvironment.EffectiveGroup" />
227 <altmember cref="M:Mono.Unix.UnixEnvironment.RealGroup" />
228 <altmember cref="M:Mono.Unix.UnixEnvironment.RealUser" />
229 <altmember cref="M:Mono.Unix.Native.Syscall.geteuid" />
232 <Member MemberName="EffectiveUserId">
233 <MemberSignature Language="C#" Value="public static long EffectiveUserId { get; set; }" />
234 <MemberSignature Language="ILAsm" Value=".property int64 EffectiveUserId" />
235 <MemberType>Property</MemberType>
237 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
238 <AssemblyVersion>2.0.0.0</AssemblyVersion>
239 <AssemblyVersion>4.0.0.0</AssemblyVersion>
242 <ReturnType>System.Int64</ReturnType>
245 <summary>Gets the effective user ID of the process.</summary>
247 A <see cref="T:System.Int64" /> containing the effective user ID of
253 <see cref="P:Mono.Unix.UnixEnvironment.EffectiveUserId" /> gives
254 the process additional permissions during execution of
255 <see cref="F:Mono.Unix.FileSpecialAttributes.SetUserId" />
259 <altmember cref="M:Mono.Unix.UnixEnvironment.EffectiveGroupId" />
260 <altmember cref="M:Mono.Unix.UnixEnvironment.RealGroupId" />
261 <altmember cref="M:Mono.Unix.UnixEnvironment.RealUserId" />
262 <altmember cref="M:Mono.Unix.Native.Syscall.geteuid" />
265 <Member MemberName="GetConfigurationString">
266 <MemberSignature Language="C#" Value="public static string GetConfigurationString (Mono.Unix.Native.ConfstrName name);" />
267 <MemberSignature Language="ILAsm" Value=".method public static hidebysig string GetConfigurationString(valuetype Mono.Unix.Native.ConfstrName name) cil managed" />
268 <MemberType>Method</MemberType>
270 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
271 <AssemblyVersion>2.0.0.0</AssemblyVersion>
272 <AssemblyVersion>4.0.0.0</AssemblyVersion>
276 <AttributeName>System.CLSCompliant(false)</AttributeName>
280 <ReturnType>System.String</ReturnType>
283 <Parameter Name="name" Type="Mono.Unix.Native.ConfstrName" />
287 A <see cref="T:Mono.Unix.Native.ConfstrName" /> value containing the
288 configuration value to retrieve.
291 Retrieve the value of the configuration value
292 <paramref name="name" />.
295 A <see cref="T:System.String" /> containing the value of the
296 configuration variable <paramref name="name" />.
300 <exception cref="System.ArgumentException">
303 <paramref name="name" />
305 [<see cref="F:Mono.Unix.Native.Errno.EINVAL" />]
308 <altmember cref="M:Mono.Unix.Native.Syscall.confstr" />
311 <Member MemberName="GetConfigurationValue">
312 <MemberSignature Language="C#" Value="public static long GetConfigurationValue (Mono.Unix.Native.SysconfName name);" />
313 <MemberSignature Language="ILAsm" Value=".method public static hidebysig int64 GetConfigurationValue(valuetype Mono.Unix.Native.SysconfName name) cil managed" />
314 <MemberType>Method</MemberType>
316 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
317 <AssemblyVersion>2.0.0.0</AssemblyVersion>
318 <AssemblyVersion>4.0.0.0</AssemblyVersion>
322 <AttributeName>System.CLSCompliant(false)</AttributeName>
326 <ReturnType>System.Int64</ReturnType>
329 <Parameter Name="name" Type="Mono.Unix.Native.SysconfName" />
333 A <see cref="T:Mono.Unix.Native.SysconfName" /> value containing the
334 configurable system limit or option variable to lookup.
337 Retrieve the value of the configurable system limit or
338 option value <paramref name="name" />.
341 A <see cref="T:System.Int64" /> containing the value of the
342 configurable system limit or option value <paramref name="name" />.
346 This method provides a way for applications to determine the
347 current value of a configurable system limit or option variable.
348 The <paramref name="name" /> argument specifies the system
349 variable to be queried.
352 <exception cref="System.ArgumentException">
355 <paramref name="name" />
357 [<see cref="F:Mono.Unix.Native.Errno.EINVAL" />]
360 <altmember cref="M:Mono.Unix.Native.Syscall.sysconf" />
363 <Member MemberName="GetParentProcess">
364 <MemberSignature Language="C#" Value="public static Mono.Unix.UnixProcess GetParentProcess ();" />
365 <MemberSignature Language="ILAsm" Value=".method public static hidebysig class Mono.Unix.UnixProcess GetParentProcess() cil managed" />
366 <MemberType>Method</MemberType>
368 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
369 <AssemblyVersion>2.0.0.0</AssemblyVersion>
370 <AssemblyVersion>4.0.0.0</AssemblyVersion>
373 <ReturnType>Mono.Unix.UnixProcess</ReturnType>
377 <summary>Gets information about the parent process.</summary>
379 A <see cref="T:Mono.Unix.UnixProcess" /> instance containing
380 information about the parent process.
386 <Member MemberName="GetParentProcessId">
387 <MemberSignature Language="C#" Value="public static int GetParentProcessId ();" />
388 <MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 GetParentProcessId() cil managed" />
389 <MemberType>Method</MemberType>
391 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
392 <AssemblyVersion>2.0.0.0</AssemblyVersion>
393 <AssemblyVersion>4.0.0.0</AssemblyVersion>
396 <ReturnType>System.Int32</ReturnType>
400 <summary>Gets the process ID of the parent process.</summary>
402 A <see cref="T:System.Int32" /> containing the process ID of the
407 <altmember cref="M:Mono.Unix.Native.Syscall.getppid" />
410 <Member MemberName="GetProcessGroup">
411 <MemberSignature Language="C#" Value="public static int GetProcessGroup ();" />
412 <MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 GetProcessGroup() cil managed" />
413 <MemberType>Method</MemberType>
415 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
416 <AssemblyVersion>2.0.0.0</AssemblyVersion>
417 <AssemblyVersion>4.0.0.0</AssemblyVersion>
420 <ReturnType>System.Int32</ReturnType>
424 <summary>Gets the process group ID of the current process.</summary>
426 A <see cref="T:System.Int32" /> containing the process group ID of
431 Process groups are used for distribution of signals, and by
432 terminals to arbitrate requests for their input: processes that
433 have the same process group as the terminal are foreground and
434 may read, while others will block with a signal if they attempt
438 This system call is thus used by programs such as <c>csh</c>(1)
439 to create process groups in implementing job control. The
440 <see cref="M:Mono.Unix.Native.Syscall.tcgetpgrp" />() and
441 <see cref="M:Mono.Unix.Native.Syscall.tcsetpgrp" />()
442 calls are used to get/set the process group of the control terminal.
445 <altmember cref="M:Mono.Unix.Native.Syscall.getpgrp" />
448 <Member MemberName="GetSupplementaryGroupIds">
449 <MemberSignature Language="C#" Value="public static long[] GetSupplementaryGroupIds ();" />
450 <MemberSignature Language="ILAsm" Value=".method public static hidebysig int64[] GetSupplementaryGroupIds() cil managed" />
451 <MemberType>Method</MemberType>
453 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
454 <AssemblyVersion>2.0.0.0</AssemblyVersion>
455 <AssemblyVersion>4.0.0.0</AssemblyVersion>
458 <ReturnType>System.Int64[]</ReturnType>
462 <summary>Gets the current group access list.</summary>
464 A <see cref="T:System.Int64" /> array containing the group access
465 list of the current process.
469 The group access list is a list of groups which the current
470 process belongs to. These groups are used for file access checks
472 <see cref="P:Mono.Unix.UnixEnvironment.RealUser" /> is not the
474 <see cref="P:Mono.Unix.UnixFileSystemInfo.OwnerUser" />; each of
475 the supplementary groups is checked against
476 <see cref="P:Mono.Unix.UnixFileSystemInfo.OwnerGroup" /> to see if
477 group access applies, before using the "other"
478 <see cref="P:Mono.Unix.UnixFileSystemInfo.FileAccessPermissions" />.
481 <altmember cref="M:Mono.Unix.Native.Syscall.getgroups" />
484 <Member MemberName="GetSupplementaryGroups">
485 <MemberSignature Language="C#" Value="public static Mono.Unix.UnixGroupInfo[] GetSupplementaryGroups ();" />
486 <MemberSignature Language="ILAsm" Value=".method public static hidebysig class Mono.Unix.UnixGroupInfo[] GetSupplementaryGroups() cil managed" />
487 <MemberType>Method</MemberType>
489 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
490 <AssemblyVersion>2.0.0.0</AssemblyVersion>
491 <AssemblyVersion>4.0.0.0</AssemblyVersion>
494 <ReturnType>Mono.Unix.UnixGroupInfo[]</ReturnType>
498 <summary>Gets the current group access list.</summary>
500 A <see cref="T:Mono.Unix.UnixGroupInfo" /> array containing
501 information about the group access list of the current process.
505 The group access list is a list of groups which the current
506 process belongs to. These groups are used for file access checks
508 <see cref="P:Mono.Unix.UnixEnvironment.RealUser" /> is not the
510 <see cref="P:Mono.Unix.UnixFileSystemInfo.OwnerUser" />; each of
511 the supplementary groups is checked against
512 <see cref="P:Mono.Unix.UnixFileSystemInfo.OwnerGroup" /> to see if
513 group access applies, before using the "other"
514 <see cref="P:Mono.Unix.UnixFileSystemInfo.FileAccessPermissions" />.
517 <altmember cref="M:Mono.Unix.Native.Syscall.getgroups" />
520 <Member MemberName="GetUserShells">
521 <MemberSignature Language="C#" Value="public static string[] GetUserShells ();" />
522 <MemberSignature Language="ILAsm" Value=".method public static hidebysig string[] GetUserShells() cil managed" />
523 <MemberType>Method</MemberType>
525 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
526 <AssemblyVersion>2.0.0.0</AssemblyVersion>
527 <AssemblyVersion>4.0.0.0</AssemblyVersion>
530 <ReturnType>System.String[]</ReturnType>
534 <summary>Gets all user shells.</summary>
536 A <see cref="T:System.String" /> array containing all user shells on
541 A user shell is defined by the system manager in the shells
542 database as described in <c>shells</c>(5) (frequently the file
543 <c>/etc/shells</c>). If the shells database is not available,
544 then this returns an array containing the elements <c>/bin/sh</c>
548 <altmember cref="M:Mono.Unix.Native.Syscall.setusershell" />
549 <altmember cref="M:Mono.Unix.Native.Syscall.getusershell" />
550 <altmember cref="M:Mono.Unix.Native.Syscall.endusershell" />
553 <Member MemberName="Login">
554 <MemberSignature Language="C#" Value="public static string Login { get; }" />
555 <MemberSignature Language="ILAsm" Value=".property string Login" />
556 <MemberType>Property</MemberType>
558 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
559 <AssemblyVersion>2.0.0.0</AssemblyVersion>
560 <AssemblyVersion>4.0.0.0</AssemblyVersion>
563 <ReturnType>System.String</ReturnType>
566 <summary>Gets the login name.</summary>
568 A <see cref="T:System.String" /> containing the login name of the
569 user executing the process.
574 <see cref="P:Mono.Unix.UnixEnvironment.UserName" />.
579 <Member MemberName="MachineName">
580 <MemberSignature Language="C#" Value="public static string MachineName { get; set; }" />
581 <MemberSignature Language="ILAsm" Value=".property string MachineName" />
582 <MemberType>Property</MemberType>
584 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
585 <AssemblyVersion>2.0.0.0</AssemblyVersion>
586 <AssemblyVersion>4.0.0.0</AssemblyVersion>
589 <ReturnType>System.String</ReturnType>
592 <summary>Gets or sets the machine name of the machine the process is
593 running on.</summary>
595 A <see cref="T:System.String" /> containing the machine name.
599 Only the super-user can change the machine name.
602 <exception cref="System.InvalidOperationException">
604 The caller tried to set the host name and was not the super-user.
605 [<see cref="F:Mono.Unix.Native.Errno.EPERM" />]
608 <altmember cref="M:Mono.Unix.Native.Syscall.gethostname" />
609 <altmember cref="M:Mono.Unix.Native.Syscall.sethostname" />
612 <Member MemberName="RealGroup">
613 <MemberSignature Language="C#" Value="public static Mono.Unix.UnixGroupInfo RealGroup { get; }" />
614 <MemberSignature Language="ILAsm" Value=".property class Mono.Unix.UnixGroupInfo RealGroup" />
615 <MemberType>Property</MemberType>
617 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
618 <AssemblyVersion>2.0.0.0</AssemblyVersion>
619 <AssemblyVersion>4.0.0.0</AssemblyVersion>
622 <ReturnType>Mono.Unix.UnixGroupInfo</ReturnType>
625 <summary>Gets information about the real group of the process.</summary>
627 A <see cref="T:Mono.Unix.UnixGroupInfo" /> containing information
628 about the real group of the process.
632 The real group is the group of the user who invoked the program.
635 <altmember cref="M:Mono.Unix.UnixEnvironment.EffectiveGroup" />
636 <altmember cref="M:Mono.Unix.UnixEnvironment.EffectiveUser" />
637 <altmember cref="M:Mono.Unix.UnixEnvironment.RealUser" />
638 <altmember cref="M:Mono.Unix.Native.Syscall.getgid" />
641 <Member MemberName="RealGroupId">
642 <MemberSignature Language="C#" Value="public static long RealGroupId { get; }" />
643 <MemberSignature Language="ILAsm" Value=".property int64 RealGroupId" />
644 <MemberType>Property</MemberType>
646 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
647 <AssemblyVersion>2.0.0.0</AssemblyVersion>
648 <AssemblyVersion>4.0.0.0</AssemblyVersion>
651 <ReturnType>System.Int64</ReturnType>
654 <summary>Gets the real group ID of the process.</summary>
656 A <see cref="T:System.Int64" /> containing the real group ID of the
661 The real group ID is the group of the user who invoked the program.
664 <altmember cref="M:Mono.Unix.UnixEnvironment.EffectiveGroupId" />
665 <altmember cref="M:Mono.Unix.UnixEnvironment.EffectiveUserId" />
666 <altmember cref="M:Mono.Unix.UnixEnvironment.RealUserId" />
667 <altmember cref="M:Mono.Unix.Native.Syscall.getgid" />
670 <Member MemberName="RealUser">
671 <MemberSignature Language="C#" Value="public static Mono.Unix.UnixUserInfo RealUser { get; }" />
672 <MemberSignature Language="ILAsm" Value=".property class Mono.Unix.UnixUserInfo RealUser" />
673 <MemberType>Property</MemberType>
675 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
676 <AssemblyVersion>2.0.0.0</AssemblyVersion>
677 <AssemblyVersion>4.0.0.0</AssemblyVersion>
680 <ReturnType>Mono.Unix.UnixUserInfo</ReturnType>
683 <summary>Gets information about the real user of the process.</summary>
685 A <see cref="T:Mono.Unix.UnixUserInfo" /> containing information
686 about the real user of the process.
690 The real user is the user who invoked the program.
693 <altmember cref="M:Mono.Unix.UnixEnvironment.EffectiveGroup" />
694 <altmember cref="M:Mono.Unix.UnixEnvironment.EffectiveUser" />
695 <altmember cref="M:Mono.Unix.UnixEnvironment.RealGroup" />
696 <altmember cref="M:Mono.Unix.Native.Syscall.getuid" />
699 <Member MemberName="RealUserId">
700 <MemberSignature Language="C#" Value="public static long RealUserId { get; }" />
701 <MemberSignature Language="ILAsm" Value=".property int64 RealUserId" />
702 <MemberType>Property</MemberType>
704 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
705 <AssemblyVersion>2.0.0.0</AssemblyVersion>
706 <AssemblyVersion>4.0.0.0</AssemblyVersion>
709 <ReturnType>System.Int64</ReturnType>
712 <summary>Gets the real user ID of the process.</summary>
714 A <see cref="T:System.Int64" /> containing the real user ID of the
719 The real user ID is that of the user who invoked the program.
722 <altmember cref="M:Mono.Unix.UnixEnvironment.EffectiveGroupId" />
723 <altmember cref="M:Mono.Unix.UnixEnvironment.EffectiveUserId" />
724 <altmember cref="M:Mono.Unix.UnixEnvironment.RealGroupId" />
725 <altmember cref="M:Mono.Unix.Native.Syscall.getuid" />
728 <Member MemberName="SetNiceValue">
729 <MemberSignature Language="C#" Value="public static void SetNiceValue (int inc);" />
730 <MemberSignature Language="ILAsm" Value=".method public static hidebysig void SetNiceValue(int32 inc) cil managed" />
731 <MemberType>Method</MemberType>
733 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
734 <AssemblyVersion>2.0.0.0</AssemblyVersion>
735 <AssemblyVersion>4.0.0.0</AssemblyVersion>
738 <ReturnType>System.Void</ReturnType>
741 <Parameter Name="inc" Type="System.Int32" />
745 A <see cref="T:System.Int32" /> containing the value to add to the
746 current process' <i>nice value</i>.
748 <summary>Subtraces <paramref name="inc" /> from the process' priority.</summary>
751 The process' <i>nice value</i> is a value subtraced from the
752 process' priority. The higher the value of
753 <paramref name="inc" />, the lower the priority of the process
756 <exception cref="T:Mono.Unix.UnixIOException">
757 <paramref name="inc" /> is negative but the caller is not the
759 [<see cref="F:Mono.Unix.Native.Errno.EPERM" />]
761 <altmember cref="M:Mono.Unix.Native.Syscall.nice" />
764 <Member MemberName="SetProcessGroup">
765 <MemberSignature Language="C#" Value="public static void SetProcessGroup ();" />
766 <MemberSignature Language="ILAsm" Value=".method public static hidebysig void SetProcessGroup() cil managed" />
767 <MemberType>Method</MemberType>
769 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
770 <AssemblyVersion>2.0.0.0</AssemblyVersion>
771 <AssemblyVersion>4.0.0.0</AssemblyVersion>
774 <ReturnType>System.Void</ReturnType>
778 <summary>Set the process group of the current process.</summary>
781 If the affected process is not the invoking process, then it must
782 be a child of the invoking process, and both processes must be in
786 <exception cref="System.InvalidOperationException">
788 The target process is a session leader.
789 [<see cref="F:Mono.Unix.Native.Errno.EPERM" />]
792 <exception cref="Mono.Unix.UnixIOException">
794 The target process is not the calling process or
795 a child of the calling process.
796 [<see cref="F:Mono.Unix.Native.Errno.ESRCH" />]
800 The requested process is a child of the calling process,
801 but it has performed an
802 <see cref="F:Mono.Unix.Native.Syscall.exec" />(3)
804 [<see cref="F:Mono.Unix.Native.Errno.EACCES" />]
807 <altmember cref="P:Mono.Unix.UnixProcess.ProcessGroupId" />
808 <altmember cref="M:Mono.Unix.Native.Syscall.setpgrp" />
811 <Member MemberName="SetSupplementaryGroupIds">
812 <MemberSignature Language="C#" Value="public static void SetSupplementaryGroupIds (long[] list);" />
813 <MemberSignature Language="ILAsm" Value=".method public static hidebysig void SetSupplementaryGroupIds(int64[] list) cil managed" />
814 <MemberType>Method</MemberType>
816 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
817 <AssemblyVersion>2.0.0.0</AssemblyVersion>
818 <AssemblyVersion>4.0.0.0</AssemblyVersion>
821 <ReturnType>System.Void</ReturnType>
824 <Parameter Name="list" Type="System.Int64[]" />
828 A <see cref="T:System.Int64" /> array containing the
829 new group access list.
832 Set the group access list of the current process.
836 Only the super-user may set new groups.
839 The group access list is a list of groups which the current
840 process belongs to. These groups are used for file access checks
842 <see cref="P:Mono.Unix.UnixEnvironment.RealUser" /> is not the
844 <see cref="P:Mono.Unix.UnixFileSystemInfo.OwnerUser" />; each of
845 the supplementary groups is checked against
846 <see cref="P:Mono.Unix.UnixFileSystemInfo.OwnerGroup" /> to see if
847 group access applies, before using the "other"
848 <see cref="P:Mono.Unix.UnixFileSystemInfo.FileAccessPermissions" />.
851 <exception cref="System.InvalidOperationException">
853 The caller is not the super-user.
854 [<see cref="F:Mono.Unix.Native.Errno.EPERM" />]
857 <altmember cref="M:Mono.Unix.Native.Syscall.setgroups" />
860 <Member MemberName="SetSupplementaryGroups">
861 <MemberSignature Language="C#" Value="public static void SetSupplementaryGroups (Mono.Unix.UnixGroupInfo[] groups);" />
862 <MemberSignature Language="ILAsm" Value=".method public static hidebysig void SetSupplementaryGroups(class Mono.Unix.UnixGroupInfo[] groups) cil managed" />
863 <MemberType>Method</MemberType>
865 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
866 <AssemblyVersion>2.0.0.0</AssemblyVersion>
867 <AssemblyVersion>4.0.0.0</AssemblyVersion>
870 <ReturnType>System.Void</ReturnType>
873 <Parameter Name="groups" Type="Mono.Unix.UnixGroupInfo[]" />
876 <param name="groups">
877 A <see cref="T:Mono.Unix.UnixGroupInfo" /> array containing the
878 new group access list.
881 Set the group access list of the current process.
885 Only the super-user may set new groups.
888 The group access list is a list of groups which the current
889 process belongs to. These groups are used for file access checks
891 <see cref="P:Mono.Unix.UnixEnvironment.RealUser" /> is not the
893 <see cref="P:Mono.Unix.UnixFileSystemInfo.OwnerUser" />; each of
894 the supplementary groups is checked against
895 <see cref="P:Mono.Unix.UnixFileSystemInfo.OwnerGroup" /> to see if
896 group access applies, before using the "other"
897 <see cref="P:Mono.Unix.UnixFileSystemInfo.FileAccessPermissions" />.
900 <exception cref="System.InvalidOperationException">
902 The caller is not the super-user.
903 [<see cref="F:Mono.Unix.Native.Errno.EPERM" />]
906 <altmember cref="M:Mono.Unix.Native.Syscall.setgroups" />
909 <Member MemberName="UserName">
910 <MemberSignature Language="C#" Value="public static string UserName { get; }" />
911 <MemberSignature Language="ILAsm" Value=".property string UserName" />
912 <MemberType>Property</MemberType>
914 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
915 <AssemblyVersion>2.0.0.0</AssemblyVersion>
916 <AssemblyVersion>4.0.0.0</AssemblyVersion>
919 <ReturnType>System.String</ReturnType>
922 <summary>Gets the user name of the user executing the process.</summary>
924 A <see cref="T:System.String" /> containing the username of the user
925 executing the process.
929 This is the username of the <i>real</i> user id.
932 This is equivalent to calling
933 <see cref="P:Mono.Unix.UnixEnvironment.RealUser" />.<see cref="P:Mono.Unix.UnixUserInfo.UserName" />.