Skip to content

Commit

Permalink
Move Lwt_process.redirection doc into the type
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterDA committed Feb 23, 2022
1 parent 20f3049 commit 776a611
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions src/unix/lwt_process.mli
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,17 @@ val shell : string -> command
(** {3 Redirections} *)

type redirection =
[ `Keep
| `Dev_null
| `Close
| `FD_copy of Unix.file_descr
| `FD_move of Unix.file_descr]
[ `Keep (** Point to the same file as in the parent. *)
| `Dev_null (** Redirect to [/dev/null] (POSIX) or [nul] (Win32). *)
| `Close (** Close the file descriptor. *)
| `FD_copy of Unix.file_descr (** Redirect to the file pointed to by [fd].
[fd] remains open in the parent. *)
| `FD_move of Unix.file_descr (** Redirect to the file pointed to by [fd].
[fd] is then closed in the parent. *)
]
(** File descriptor redirections. These are used with the [~stdin], [~stdout],
and [~stderr] arguments below to specify how the standard file descriptors
should be redirected in the child process.
- [`Keep]: point to the same file as in the parent.
- [`Dev_null]: redirect to [/dev/null] (POSIX) or [nul] (Win32).
- [`Close]: close the file descriptor.
- [`FD_copy fd] redirect to the file pointed to by [fd]. [fd] remains open.
- [`FD_move fd] redirect to the file pointed to by [fd]. [fd] is then
closed.
All optional redirection arguments default to [`Keep]. *)

(** {3 Executing} *)
Expand Down

0 comments on commit 776a611

Please sign in to comment.