Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via email, send a message with subject or
body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. Re: Allowing multiple FDs with createProcess (Akhra Gannon)
----------------------------------------------------------------------
Message: 1
Date: Fri, 13 Feb 2026 21:05:40 -0800
From: Akhra Gannon <[email protected]>
Subject: [Haskell-beginners]Re: Allowing multiple FDs with
createProcess
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Message-ID:
<cajopsuah6rxtp29rcl-pwnrrnhqa9qkctw3ng76ujf178cs...@mail.gmail.com>
Content-Type: multipart/alternative;
boundary="000000000000f107b1064ac1acd2"
not something I've ever dealt with so ignore me if someone else has a real
answer, but as a work-around could you pass file descriptors as command
args?
On Fri, Feb 13, 2026, 4:35 PM Swaren <
[email protected]> wrote:
> Hi!
>
> I'm new to Haskell, and I have a problem with the `createProcess` function
> (used to spawn a new Unix process) and FDs.
>
> The function takes a `CreateProcess` data structure, which contains
> `std_in`, `std_err` and `std_out`, plus other unrelated parameters. These
> std parameters allow to give specific file descriptors to the child process
> (0, 1 and 2, which are the standard std FDs). This feature allows to
> capture the output of processes, or provide them input, by giving them a
> pipe as std_in and std_out, for example.
>
>
> Now, is there a way to define other file descriptors? Like, having 5 more
> input pipes for the process to use. Currently, the `CreateProcess` API
> seems to be limited to the first three FDs.
>
>
> I could disable the `close_fds` arg of `CreateProcess`, so that all the
> FDs are given to the process, but that's not truly a solution as it allows
> the process to access other FDs of my program.
>
> Maybe there's a library for that, tell me, but I'd like to keep it the
> most "native" / built-in as possible.
> (plus, for some reason, it would be a pain to install a proper Haskell
> toolchain on my Frankenstein-like Linux machine)
>
> Hope it's clear enough, thanks!
>
> _______________________________________________
> Beginners mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
>
-------------- next part --------------
A message part incompatible with plain text digests has been removed ...
Name: not available
Type: text/html
Size: 2166 bytes
Desc: not available
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list -- [email protected]
To unsubscribe send an email to [email protected]
------------------------------
End of Beginners Digest, Vol 180, Issue 1
*****************************************