package MlFront_Thunk

  1. Overview
  2. Docs
Describes and runs reproducible units of work called thunks

Install

dune-project
 Dependency

Authors

Maintainers

Sources

MlFront.tar.gz
md5=561d9b7dfc392fcd7413737ac1f6071a
sha512=ec9b2fe9ac45b8429dda4f155f56f73410d1eb12b879e8f826756f2fc3d8fa00d439a75fbd48be9f6dca6cbf3ca691e2b367cd55d227d9a81f77e95cff6d9346

doc/MlFront_Thunk.ThunkIoDisk/MlFront_Thunk_IoDisk/ThunkIoDisk/MakeRacyTestSpawner/index.html

Module ThunkIoDisk.MakeRacyTestSpawnerSource

RacyTestSpawner is a functional pure-OCaml spawner that changes directories in a racy, thread-unsafe way.

You'll likely prefer to make a pure-OCaml spawner that is race-free where you'll need to shell out to "/bin/sh" or "cmd.exe" and put a "cd <directory>" in the script. Or use a library like Janestreet's spawn.

Confer https://github.com/diskuv/dk/issues/52

Parameters

Signature

Sourcetype 'a t = 'a M.t
Sourceval spawn : ?stdout:MlFront_Core.FilePath.t -> ?stderr:MlFront_Core.FilePath.t -> ?progress:MlFront_Progress.Progress.nodeobj -> unix_cmdline:(MlFront_Core.FilePath.t * string list) -> windows_appname:string -> windows_cmdline:string -> envmods:MlFront_Core.EnvMods.t -> dir:MlFront_Core.FilePath.t -> unit -> [ `Error of string | `Exited of int | `Signaled of int | `Stopped of int ] t

spawn ?stdout ?stderr ~unix_cmdline ~windows_appname ~windows_cmdline ~envmods ~dir () spawns a process with environment modifications envmods in the directory dir.

The unix_cmdline is the Unix/native process launch representation: (command, args) where command is the executable path and args is the argv tail used by Unix spawning.

The windows_appname is the exact Windows application name passed directly to CreateProcessW as lpApplicationName. The caller will use MlFront_Core.Platform.Windows.cmd_quote_word to quote it correctly; they must not use Filename.quote since that varies based on the current execution platform.

The windows_cmdline is the exact Windows command line passed directly to CreateProcessW as lpCommandLine. The caller will use MlFront_Core.Platform.Windows.cmd_quote_cmdline to quote it correctly; they must not use Filename.quote_command since that varies based on the current execution platform.

The runtime spawner must not apply any extra quoting or rewriting to either windows_appname or windows_cmdline.

The standard output/error files stdout and stderr are used if specified.