@@ -38,7 +38,7 @@ get-standard-pipe_ fd/int -> Stream:
3838 if file .is-open-file_ fd :
3939 standard-pipes_ [ fd ] = file .OpenFile_ .internal_ fd
4040 else:
41- standard-pipes_ [ fd ] = OpenPipe_ .from-std_ ( fd-to-pipe_ pipe-resource-group_ fd )
41+ standard-pipes_ [ fd ] = OpenPipe .from-std_ ( fd-to-pipe_ pipe-resource-group_ fd )
4242 return standard-pipes_ [ fd ]
4343
4444/**
@@ -54,7 +54,7 @@ get-numbered-pipe fd/int -> Stream:
5454 if file .is-open-file_ fd :
5555 return file .OpenFile_ .internal_ fd
5656 else:
57- return OpenPipe_ .from-std_ ( fd-to-pipe_ pipe-resource-group_ fd )
57+ return OpenPipe .from-std_ ( fd-to-pipe_ pipe-resource-group_ fd )
5858
5959class OpenPipeReader_ extends io .CloseableReader :
6060 pipe_ / OpenPipe_
@@ -93,6 +93,9 @@ class OpenPipe extends OpenPipe_:
9393 constructor input / bool --child-process-name = "child process" :
9494 super input --child-process-name = child-process-name
9595
96+ constructor .from-std_ resource :
97+ super .from-std_ resource
98+
9699class OpenPipe_ implements Stream :
97100 resource_ := ?
98101 state_ := ?
@@ -375,15 +378,15 @@ fork_ use-path stdin stdout stderr command arguments -> List
375378 flat-environment [ index ++ ] = ( value == null ) ? null : value .stringify
376379 exception := catch :
377380 if stdin == PIPE-CREATED :
378- pipe := OpenPipe_ true
381+ pipe := OpenPipe true
379382 result [ 0 ] = pipe
380383 stdin = pipe .fd_
381384 if stdout == PIPE-CREATED :
382- pipe := OpenPipe_ false
385+ pipe := OpenPipe false
383386 result [ 1 ] = pipe
384387 stdout = pipe .fd_
385388 if stderr == PIPE-CREATED :
386- pipe := OpenPipe_ false
389+ pipe := OpenPipe false
387390 result [ 2 ] = pipe
388391 stderr = pipe .fd_
389392 fd-3 := file-descriptor-3 ? file-descriptor-3 .fd_ : -1
@@ -474,7 +477,7 @@ The $environment argument is used as in $fork.
474477to --environment / Map?= null arguments -> Stream :
475478 if arguments is string :
476479 arguments = [ arguments ]
477- pipe-ends := OpenPipe_ true --child-process-name = arguments [ 0 ]
480+ pipe-ends := OpenPipe true --child-process-name = arguments [ 0 ]
478481 stdin := pipe-ends .fd_
479482 pipes := fork_ --environment = environment true stdin PIPE-INHERITED PIPE-INHERITED arguments [ 0 ] arguments
480483 pipe-ends .pid = pipes [ 3 ]
@@ -512,7 +515,7 @@ The $environment argument is used as in $fork.
512515from --environment / Map?= null arguments -> Stream :
513516 if arguments is string :
514517 arguments = [ arguments ]
515- pipe-ends := OpenPipe_ false --child-process-name = arguments [ 0 ]
518+ pipe-ends := OpenPipe false --child-process-name = arguments [ 0 ]
516519 stdout := pipe-ends .fd_
517520 pipes := fork_ --environment = environment true PIPE-INHERITED stdout PIPE-INHERITED arguments [ 0 ] arguments
518521 pipe-ends .pid = pipes [ 3 ]
@@ -546,7 +549,7 @@ The $environment argument is used as in $fork.
546549backticks --environment / Map?= null arguments -> string :
547550 if arguments is string :
548551 arguments = [ arguments ]
549- pipe-ends := OpenPipe_ false
552+ pipe-ends := OpenPipe false
550553 stdout := pipe-ends .fd_
551554 pipes := fork_ --environment = environment true PIPE-INHERITED stdout PIPE-INHERITED arguments [ 0 ] arguments
552555 child-process := pipes [ 3 ]
0 commit comments