pipeProcess output to hash string

user1234 user1234 at 12.de
Tue Sep 12 11:22:04 UTC 2023


On Monday, 11 September 2023 at 22:08:54 UTC, Christian Köstlin 
wrote:
> Just three remarks:
>
> First I would recommend to use `std.process : execute` instead 
> of
> `pipeProcess` in this usecase, as this will wait properly for 
> the process to exit and it also will collect its output.
>
> Second its always good to test the exit status of the process 
> ... just in case.
>
> Third I would not look at `stderr` too much .. well behaved 
> commandline tools should not put data for machines there.
>
> Kind regards,
> Christian

I'll add that the way pipeProcess is overloaded does not help. 
One take the whole command line as a string the other each 
element as an array. Very easy to get it wrong.


More information about the Digitalmars-d-learn mailing list