Creating pseudo terminals

How can I create a pseudo terminal in Linux with Haskell? Nothing is jumping out at me in the standard library. I haven't done this before in any language, so any tips would be appreciated. From what I gather, a call to posix_openpt or openpty returns a master and a slave, or alternatively opening /dev/ptmx followed by calls to grantpt and unlockpt. I'm building a load balancing and sharing system similar to Platform's LSF. The pseudo terminal is for interactive jobs running on a remote machine. Thanks for any help! -Tom

On 2007-04-29, Tom Hawkins
I haven't done this before in any language, so any tips would be appreciated. From what I gather, a call to posix_openpt or openpty returns a master and a slave, or alternatively opening /dev/ptmx followed by calls to grantpt and unlockpt.
well, then I suggest 'Stevens, Advanced programming in the unix environment' for basic pseudo terminal programming. Best regards Georg Sauthoff

On 4/29/07, Georg Sauthoff
On 2007-04-29, Tom Hawkins
wrote: Hi,
[..]
I haven't done this before in any language, so any tips would be appreciated. From what I gather, a call to posix_openpt or openpty returns a master and a slave, or alternatively opening /dev/ptmx followed by calls to grantpt and unlockpt.
well, then I suggest 'Stevens, Advanced programming in the unix environment' for basic pseudo terminal programming.
Thanks for the reference. Does Haskell's standard library support pseudo terminals, or will I have to write foreign interfaces for grantpt and unlockpt? -Tom

tomahawkins:
On 4/29/07, Georg Sauthoff
wrote: On 2007-04-29, Tom Hawkins
wrote: Hi,
[..]
I haven't done this before in any language, so any tips would be appreciated. From what I gather, a call to posix_openpt or openpty returns a master and a slave, or alternatively opening /dev/ptmx followed by calls to grantpt and unlockpt.
well, then I suggest 'Stevens, Advanced programming in the unix environment' for basic pseudo terminal programming.
Thanks for the reference.
Does Haskell's standard library support pseudo terminals, or will I have to write foreign interfaces for grantpt and unlockpt?
I'm not aware of an existing binding, so I'd suggesting writing your own. Should be pretty simple. -- Don
participants (3)
-
dons@cse.unsw.edu.au
-
Georg Sauthoff
-
Tom Hawkins