-
Notifications
You must be signed in to change notification settings - Fork 82
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
Export CGid from System.Process.Internals (especially on Windows) #90
Comments
RyanGlScott
added a commit
to RyanGlScott/text-show-instances
that referenced
this issue
Mar 8, 2017
These are impossible to support on Windows at the moment, since I don't have access to an internal datatype that process is using. We'll have to wait until haskell/process#90 is fixed.
I don't see too serious a downside here. Want to send a PR that you can
confirm fixes the problem for you?
…On Thu, Mar 9, 2017 at 12:41 AM, Ryan Scott ***@***.***> wrote:
I found myself wanting to derive some instances for CreateProcess in one
of my applications recently, only to discover that it wouldn't work on
Windows. Why? Because CreateProcess uses UserID and GroupID fields, the
definitions of which are platform-dependent:
#ifdef WINDOWS-- Define some missing types for Windows compatibility. Note that these values-- will never actually be used, as the setuid/setgid system calls are not-- applicable on Windows. No value of this type will ever exist.newtype CGid = CGid Word32
deriving (Show, Eq)type GroupID = CGidtype UserID = CGid
#elsetype PHANDLE = CPid
#endif
This Windows-only newtype CGid is only available in the internal
System.Process.Common module, and as a result, I can't make any instances
for it (and thus can't derive any instances for CreateProcess).
Would you consider reexporting CGid from System.Process.Internals? That
way I could accomplish my original goal, and process wouldn't have to
make any API promises about the design of CGid.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#90>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADBB6Pg9GU7U0x1MU14HdAVi3mLfE-dks5rjy6kgaJpZM4MXZ_Y>
.
|
RyanGlScott
added a commit
to RyanGlScott/text-show-instances
that referenced
this issue
Apr 23, 2017
* Some GHC 8.2 fixes * XdgDirectory * process instances * Remove process instances These are impossible to support on Windows at the moment, since I don't have access to an internal datatype that process is using. We'll have to wait until haskell/process#90 is fixed. * Stash Win32 additions for now * Finish Win32 addons * ForeignSrcLang * time-1.8 * Fix the build on older GHCs * Fix the build on older GHCs, pt. 2 * Fix the GHC 7.10.3 build * Version 3.6
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found myself wanting to derive some instances for
CreateProcess
in one of my applications recently, only to discover that it wouldn't work on Windows. Why? BecauseCreateProcess
usesUserID
andGroupID
fields, the definitions of which are platform-dependent:This Windows-only newtype
CGid
is only available in the internalSystem.Process.Common
module, and as a result, I can't make any instances for it (and thus can't derive any instances forCreateProcess
).Would you consider reexporting
CGid
fromSystem.Process.Internals
? That way I could accomplish my original goal, andprocess
wouldn't have to make any API promises about the design ofCGid
.The text was updated successfully, but these errors were encountered: