@@ -71,6 +71,7 @@ module Pi = struct
7171 val spawn :
7272 t ->
7373 sw :Switch .t ->
74+ ?uid : int ->
7475 ?cwd : Fs .dir_ty Path .t ->
7576 ?stdin : Flow .source_ty r ->
7677 ?stdout : Flow .sink_ty r ->
@@ -121,20 +122,21 @@ let signal (type tag) (t : [> tag ty] r) s =
121122 let module X = (val (Resource. get ops Pi. Process )) in
122123 X. signal v s
123124
124- let spawn (type tag ) ~sw (t : [> tag mgr_ty] r ) ?cwd ?stdin ?stdout ?stderr ?env ?executable args : tag ty r =
125+ let spawn (type tag ) ~sw (t : [> tag mgr_ty] r ) ?uid ? cwd ?stdin ?stdout ?stderr ?env ?executable args : tag ty r =
125126 let (Resource. T (v, ops)) = t in
126127 let module X = (val (Resource. get ops Pi. Mgr )) in
127128 X. spawn v ~sw
129+ ?uid
128130 ?cwd:(cwd :> Fs.dir_ty Path.t option )
129131 ?env
130132 ?executable args
131133 ?stdin:(stdin :> Flow.source_ty r option )
132134 ?stdout:(stdout :> Flow.sink_ty r option )
133135 ?stderr:(stderr :> Flow.sink_ty r option )
134136
135- let run t ?cwd ?stdin ?stdout ?stderr ?(is_success = Int. equal 0 ) ?env ?executable args =
137+ let run t ?uid ? cwd ?stdin ?stdout ?stderr ?(is_success = Int. equal 0 ) ?env ?executable args =
136138 Switch. run ~name: " Process.run" @@ fun sw ->
137- let child = spawn ~sw t ?cwd ?stdin ?stdout ?stderr ?env ?executable args in
139+ let child = spawn ~sw t ?uid ? cwd ?stdin ?stdout ?stderr ?env ?executable args in
138140 match await child with
139141 | `Exited code when is_success code -> ()
140142 | status ->
@@ -145,11 +147,11 @@ let pipe (type tag) ~sw ((Resource.T (v, ops)) : [> tag mgr_ty] r) =
145147 let module X = (val (Resource. get ops Pi. Mgr )) in
146148 X. pipe v ~sw
147149
148- let parse_out (type tag ) (t : [> tag mgr_ty] r ) parse ?cwd ?stdin ?stderr ?is_success ?env ?executable args =
150+ let parse_out (type tag ) (t : [> tag mgr_ty] r ) parse ?uid ? cwd ?stdin ?stderr ?is_success ?env ?executable args =
149151 Switch. run ~name: " Process.parse_out" @@ fun sw ->
150152 let r, w = pipe t ~sw in
151153 try
152- let child = spawn ~sw t ?cwd ?stdin ~stdout: w ?stderr ?env ?executable args in
154+ let child = spawn ~sw t ?uid ? cwd ?stdin ~stdout: w ?stderr ?env ?executable args in
153155 Flow. close w;
154156 let output = Buf_read. parse_exn parse r ~max_size: max_int in
155157 Flow. close r;
0 commit comments