Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trac 11100 expose part of create pipe #52

Merged

Conversation

Mistuke
Copy link
Contributor

@Mistuke Mistuke commented Jan 24, 2016

Would like to expose a part of the createPipe api which just returns an Posix.FD instead of a GHC Handle.

This is for the implementation of the Windows bit of RemoteGHCI https://ghc.haskell.org/trac/ghc/ticket/11100

@snoyberg
Copy link
Collaborator

This PR works on Windows, but not on POSIX systems.

@Mistuke
Copy link
Contributor Author

Mistuke commented Jan 24, 2016

Ah, I'll fix that. Thanks!

@Mistuke
Copy link
Contributor Author

Mistuke commented Jan 24, 2016

@snoyberg I think the appveyor one failed because of a network failure?

-- | Create a pipe for interprocess communication and return a
-- @(readEnd, writeEnd)@ `FD` pair.
--
-- @since 1.2.1.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should actually be 1.4.2.0. Similarly, can you update the ChangeLog and the .cabal file?

Mistuke added a commit to Mistuke/ghc that referenced this pull request Jan 25, 2016
Summary:
Makes the needed changes to make RemoteGHCi work on Windows.
The approach passes OS Handles areound instead of the Posix Fd
as on Linux.

The reason is that I could not find any real documentation about
the behaviour of Windows w.r.t inheritance and Posix FDs.

The implementation with Fd did not seem to be able to find the Fd
in the child process. Instead I'm using the much better documented
approach of passing inheriting handles.

This requires a small modification to the `process` library.
haskell/process#52

Test Plan: ./validate On Windows x86_64

Reviewers: simonmar, austin, hvr, thomie, bgamari, erikd

Subscribers: #ghc_windows_task_force

Differential Revision: https://phabricator.haskell.org/D1836

GHC Trac Issues: #11100
@@ -38,6 +38,7 @@ module System.Process.Internals (
withFilePathException, withCEnvironment,
translate,
createPipe,
createPipeFD,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems common to abbreviate "file descriptor" as Fd. Given that this convention is used below perhaps it would make sense to preserve consistency here?

@bgamari
Copy link
Contributor

bgamari commented Jan 26, 2016

Thanks! @snoyberg, would you like to merge this or shall I?

snoyberg added a commit that referenced this pull request Jan 26, 2016
…pipe

Trac 11100 expose part of create pipe
@snoyberg snoyberg merged commit 296cbce into haskell:master Jan 26, 2016
@snoyberg
Copy link
Collaborator

I've got it, thanks Ben. I'll make a release to Hackage now.

@bgamari
Copy link
Contributor

bgamari commented Jan 26, 2016

Thanks Michael!

@hvr
Copy link
Member

hvr commented Jan 26, 2016

@snoyberg btw, please don't forget to git tag -a -s v1.4.2.0 ... + git push v1.4.2.0 =)

PS: I see there's a lightweight tag process/1.4.2.0... was that deliberate?

@snoyberg
Copy link
Collaborator

Done Herbert, thanks for the reminder.

On Tue, Jan 26, 2016 at 1:12 PM, Herbert Valerio Riedel <
notifications@github.com> wrote:

@snoyberg https://github.com/snoyberg btw, please don't forget to git
tag -a -s v1.4.2.0 ... + git push v1.4.2.0 =)


Reply to this email directly or view it on GitHub
#52 (comment).

bgamari pushed a commit to bgamari/ghc that referenced this pull request Jan 26, 2016
Makes the needed changes to make RemoteGHCi work on Windows.
The approach passes OS Handles areound instead of the Posix Fd
as on Linux.

The reason is that I could not find any real documentation about
the behaviour of Windows w.r.t inheritance and Posix FDs.

The implementation with Fd did not seem to be able to find the Fd
in the child process. Instead I'm using the much better documented
approach of passing inheriting handles.

This requires a small modification to the `process` library.
haskell/process#52

Test Plan: ./validate On Windows x86_64

Reviewers: thomie, erikd, bgamari, austin, hvr, simonmar

Reviewed By: simonmar

Subscribers: #ghc_windows_task_force

Differential Revision: https://phabricator.haskell.org/D1836

GHC Trac Issues: #11100
Mistuke added a commit to Mistuke/ghc that referenced this pull request Jan 26, 2016
Summary:
Makes the needed changes to make RemoteGHCi work on Windows.
The approach passes OS Handles areound instead of the Posix Fd
as on Linux.

The reason is that I could not find any real documentation about
the behaviour of Windows w.r.t inheritance and Posix FDs.

The implementation with Fd did not seem to be able to find the Fd
in the child process. Instead I'm using the much better documented
approach of passing inheriting handles.

This requires a small modification to the `process` library.
haskell/process#52

Test Plan: ./validate On Windows x86_64

Reviewers: simonmar, austin, hvr, thomie, bgamari, erikd

Subscribers: #ghc_windows_task_force

Differential Revision: https://phabricator.haskell.org/D1836

GHC Trac Issues: #11100
ghc-mirror pushed a commit to ghc/ghc that referenced this pull request Jan 27, 2016
Makes the needed changes to make RemoteGHCi work on Windows.
The approach passes OS Handles areound instead of the Posix Fd
as on Linux.

The reason is that I could not find any real documentation about
the behaviour of Windows w.r.t inheritance and Posix FDs.

The implementation with Fd did not seem to be able to find the Fd
in the child process. Instead I'm using the much better documented
approach of passing inheriting handles.

This requires a small modification to the `process` library.
haskell/process#52

Test Plan: ./validate On Windows x86_64

Reviewers: thomie, erikd, bgamari, simonmar, austin, hvr

Reviewed By: simonmar

Subscribers: #ghc_windows_task_force

Differential Revision: https://phabricator.haskell.org/D1836

GHC Trac Issues: #11100
ghc-mirror pushed a commit to ghc/ghc that referenced this pull request Jan 27, 2016
Makes the needed changes to make RemoteGHCi work on Windows.
The approach passes OS Handles areound instead of the Posix Fd
as on Linux.

The reason is that I could not find any real documentation about
the behaviour of Windows w.r.t inheritance and Posix FDs.

The implementation with Fd did not seem to be able to find the Fd
in the child process. Instead I'm using the much better documented
approach of passing inheriting handles.

This requires a small modification to the `process` library.
haskell/process#52

Test Plan: ./validate On Windows x86_64

Reviewers: thomie, erikd, bgamari, simonmar, austin, hvr

Reviewed By: simonmar

Subscribers: #ghc_windows_task_force

Differential Revision: https://phabricator.haskell.org/D1836

GHC Trac Issues: #11100

(cherry picked from commit 44a5d51)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants