Changeset 34291 in project


Ignore:
Timestamp:
08/15/17 21:08:59 (6 weeks ago)
Author:
sjamaan
Message:

man/5: Move Windows-specific spawn and open/noinherit definitions to (chicken process) and (chicken file posix)

These are "available" on UNIX now too, as stubs that raise an error,
exactly like process-fork and such are "available" on Windows.

Location:
wiki/man/5
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wiki/man/5/Module (chicken file posix)

    r34173 r34291  
    7474This means you can safely add these to any set of flags when opening a
    7575file or pipe, but it simply won't have an effect.
     76
     77==== Open flags for create-pipe
     78
     79<constant>open/noinherit</constant>
     80
     81This variable is a mode value for {{create-pipe}}. Useful when
     82spawning a child process on Windows.  On UNIX it is defined as zero,
     83so you can safely pass it there, but it will have no effect.
    7684
    7785
  • wiki/man/5/Module (chicken process)

    r34070 r34291  
    7272'''NOTE''': On native Windows builds (all except cygwin), this
    7373procedure is unimplemented and will raise an error.
     74
     75==== process-spawn
     76
     77<procedure>(process-spawn MODE COMMAND [ARGUMENT-LIST [ENVIRONMENT-LIST [EXACT-FLAG]]])</procedure>
     78
     79Creates and runs a new process with the given {{COMMAND}} filename and
     80the optional {{ARGUMENT-LIST}} and {{ENVIRONMENT-LIST}}. {{MODE}}
     81specifies how exactly the process should be executed and must be one
     82or more of the {{spawn/...}} flags listed below.
     83
     84The {{EXACT-FLAG}}, default {{#f}}, controls quote-wrapping of
     85argument strings. When {{#t}} quote-wrapping is not performed.
     86
     87Returns:
     88* the exit status when synchronous
     89* the PID when asynchronous
     90* -1 when failure
     91
     92'''NOTE''': On all Unix-like builds (all except native MingW-based
     93Windows platforms), this procedure is unimplemented and will raise an
     94error.
     95
     96<constant>spawn/overlay</constant>
     97<constant>spawn/wait</constant>
     98<constant>spawn/nowait</constant>
     99<constant>spawn/nowaito</constant>
     100<constant>spawn/detach</constant>
     101
     102These variables contains special flags that specify the exact
     103semantics of {{process-spawn}}:
     104
     105* {{spawn/overlay}} replaces the current process with the new one.
     106* {{spawn/wait}} suspends execution of the current process until the spawned process returns.
     107* {{spawn/nowait}} does the opposite ({{spawn/nowaito}} is identical, according to the Microsoft documentation) and runs the process asynchronously.
     108* {{spawn/detach}} runs the new process in the background, without being attached to a console.
     109
    74110
    75111==== process-wait
     
    297333=== Windows specific notes
    298334
    299 Use of UTF8 encoded strings for pathnames is not supported. Windows uses a
    300 16-bit UNICODE encoding with special system calls for wide-character support.
    301 Only single-byte string encoding can be used.
     335Use of UTF8 encoded strings for pathnames is not supported. Windows
     336uses a 16-bit UNICODE encoding with special system calls for
     337wide-character support.  Only single-byte string encoding can be used.
    302338
    303339---
  • wiki/man/5/TODO/Unit posix

    r34253 r34291  
    155155 terminal-port?  terminal-name
    156156
    157 
    158 ==== Additional Definitions
    159 
    160 Only available for Windows
    161 
    162 * open/noinherit
    163 
    164 This variable is a mode value for {{create-pipe}}. Useful when spawning a child process.
    165 
    166 * spawn/overlay
    167 * spawn/wait
    168 * spawn/nowait
    169 * spawn/nowaito
    170 * spawn/detach
    171 
    172 These variables contains special flags that specify the exact semantics of {{process-spawn}}:
    173 {{spawn/overlay}} replaces the current process with the new one.
    174 {{spawn/wait}} suspends execution of the current process until the spawned process returns.
    175 {{spawn/nowait}} does the opposite ({{spawn/nowaito}} is identical, according to the Microsoft
    176 documentation) and runs the process asynchronously.
    177 {{spawn/detach}} runs the new process in the background, without being attached to a console.
    178 
    179 ==== process-spawn
    180 
    181 <procedure>(process-spawn MODE COMMAND [ARGUMENT-LIST [ENVIRONMENT-LIST [EXACT-FLAG]]])</procedure>
    182 
    183 Creates and runs a new process with the given {{COMMAND}} filename and the optional
    184 {{ARGUMENT-LIST}} and {{ENVIRONMENT-LIST}}. {{MODE}} specifies how exactly the process
    185 should be executed and must be one or more of the {{spawn/...}} flags defined above.
    186 
    187 The {{EXACT-FLAG}}, default {{#f}}, controls quote-wrapping of argument strings. When {{#t}}
    188 quote-wrapping is not performed.
    189 
    190 Returns:
    191 * the exit status when synchronous
    192 * the PID when asynchronous
    193 * -1 when failure
    194 
    195157----
    196158Previous: [[Unit srfi-4]]
Note: See TracChangeset for help on using the changeset viewer.