Changeset 34992 in project


Ignore:
Timestamp:
01/07/18 21:01:09 (12 months ago)
Author:
sjamaan
Message:

man/5 Add (chicken process-context posix) module chapter to manual

Location:
wiki/man/5
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • wiki/man/5/Included modules

    r34696 r34992  
    4141* [[Module (chicken process signal)]] : Sending and receiving POSIX process signals
    4242* [[Module (chicken process-context)]] : Accessing the context (arguments, environment etc) of the current process
     43* [[Module (chicken process-context posix)]] : POSIX-specific context access
    4344* [[Module (chicken random)]] : Generating pseudo-random number
    4445* [[Module (chicken read-syntax)]] : Creating syntactic extensions to the reader
  • wiki/man/5/Module (chicken process-context)

    r34904 r34992  
    8484Changes the current working directory to {{NAME}}.
    8585
    86 ==== change-directory*
    87 
    88 <procedure>(change-directory* FD)</procedure>
    89 <procedure>(set! (current-directory) FD)</procedure>
    90 
    91 Changes the current working directory to the one represented by the
    92 file-descriptor {{FD}}, which should be an exact integer.
    93 
    94 '''NOTE''': Windows does not allow {{{open}}} on directories, so while
    95 technically it is supported, in practice you cannot use this procedure
    96 on native Windows builds (on cygwin it works because cygwin emulates
    97 this).
    98 
    9986==== current-directory
    10087
     
    10390Returns the name of the current working directory.
    10491
    105 ==== set-root-directory!
    106 
    107 <procedure>(set-root-directory! STRING)</procedure>
    108 
    109 Sets the root directory for the current process to the path given in
    110 {{STRING}} (using the {{chroot}} function).  If the current process
    111 has no root permissions, the operation will fail.
    112 
    113 '''NOTE''': On native Windows builds (all except cygwin), this
    114 procedure is unimplemented and will raise an error.
    115 
    116 
    117 === Retrieving user & group information
    118 
    119 ==== current-user-id
    120 
    121 <procedure>(current-user-id)</procedure>
    122  [setter] (set! (current-user-id) UID)
    123 
    124 Get or set the real user-id of the current process. The procedure corresponds to the getuid and setuid C functions.
    125 
    126 '''NOTE''': On native Windows builds (all except cygwin), this
    127 procedure is unimplemented and will raise an error.
    128 
    129 ==== current-user-id
    130 
    131 <procedure>(current-user-name)</procedure>
    132 
    133 Get the login name corresponding to the real user-id of the current
    134 process from the system password database.
    135 
    136 On Windows, there's no user-id and no distinction between real and
    137 effective user, but this procedure ''will'' return the username
    138 associated with the current process, so it is safe to use.
    139 
    140 
    141 ==== current-effective-user-id
    142 
    143 <procedure>(current-effective-user-id)</procedure>
    144  [setter] (set! (current-effective-user-id) UID)
    145 
    146 Get or set the effective user-id of the current process.
    147 
    148 '''NOTE''': On native Windows builds (all except cygwin), this
    149 procedure is unimplemented and will raise an error.
    150 
    151 ==== current-user-id
    152 
    153 <procedure>(current-effective-user-name)</procedure>
    154 
    155 Get the login name corresponding to the effective user-id of the
    156 current process from the system password database.
    157 
    158 '''NOTE''': On native Windows builds (all except cygwin), this
    159 procedure is unimplemented and will raise an error.
    160 
    161 ==== current-group-id
    162 
    163 <procedure>(current-group-id)</procedure>
    164  [setter] (set! (current-group-id) GID)
    165 
    166 Get or set the real group-id of the current process.
    167 
    168 '''NOTE''': On native Windows builds (all except cygwin), this
    169 procedure is unimplemented and will raise an error.
    170 
    171 ==== current-effective-group-id
    172 
    173 <procedure>(current-effective-group-id)</procedure>
    174  [setter] (set! (current-effective-group-id) GID)
    175 
    176 Get or set the effective group-id of the current process.
    177 ID can be found, then {{#f}} is returned.
    178 
    179 '''NOTE''': On native Windows builds (all except cygwin), this
    180 procedure is unimplemented and will raise an error.
    18192
    18293=== Process identity
     
    18899Returns the process ID of the current process.
    189100
    190 ==== parent-process-id
    191 
    192 <procedure>(parent-process-id)</procedure>
    193 
    194 Returns the process ID of the parent of the current process.
    195 
    196 '''NOTE''': On native Windows builds (all except cygwin), this
    197 procedure is unimplemented and will raise an error.
    198 
    199 ==== process-group-id
    200 
    201 <procedure>(process-group-id PID)</procedure>
    202  [setter] (set! (process-group-id PID) PGID)
    203 
    204 Get or set the process group ID of the process specified by {{PID}}.
    205 
    206 '''NOTE''': On native Windows builds (all except cygwin), this
    207 procedure is unimplemented and will raise an error.
    208 
    209 ==== user-information
    210 
    211 <procedure>(user-information USER [AS-VECTOR])</procedure>
    212 
    213 If {{USER}} specifes a valid username (as a string) or user ID, then
    214 the user database is consulted and a list of 7 values are returned:
    215 the user-name, the encrypted password, the user ID, the group ID, a
    216 user-specific string, the home directory and the default shell. When
    217 {{AS-VECTOR}} is {{#t}} a vector of 7 elements is returned instead of
    218 a list. If no user with this name or id then {{#f}} is returned.
    219 
    220 Note: on Android systems, the user-specific string is always {{""}},
    221 since {{pw_gecos}} is not available in the C {{passwd}} struct on that
    222 platform.
    223 
    224 '''NOTE''': On native Windows builds (all except cygwin), this
    225 procedure is unimplemented and will raise an error.
    226 
    227 
    228101---
    229102Previous: [[Module (chicken process signal)]]
    230103
    231 Next: [[Module (chicken random)]]
     104Next: [[Module (chicken process-context posix)]]
Note: See TracChangeset for help on using the changeset viewer.