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
Return from fork() is pid_t, not int #46275
Comments
In current trunk (60097). Return from fork is not int but pid_t. |
Can you provide a patch? It would be good if it still worked on systems Also, what systems use 64-bit pids? |
Yeah; I shuold be able to provide one. I just hacked 2.4.4 to work so I HiStar does (http://www.scs.stanford.edu/histar/). Not sure if it's better to test for pid_t (in configure) or just use a |
It's probably better to use pid_t through the code and add a typedef int On my Linux, pid_t is defined as __PID_T_TYPE, which is defines as |
Don't use long long literally; not all systems have such a type, and |
I fixed the bug in r60484. Python was already using pid_t on several Do you want to port the fix to 2.5? |
I'm not quite sure that the patch actually fixes the If so, Python would now fail to compile under that If that aspect was fixed also (e.g. by always returning |
Great point. pid_t is always 64-bit on HiStar. |
Actually the current trunk of as of this morning (60484) is still broken |
Ryan Stutsman wrote:
I'll see what I kind do about it. Christian |
Martin v. Löwis wrote:
I added the size comparison to identify systems with sizeof(pid_t) >
Your proposal looks sound and good to me, but it involves some work. The In r60504 I've changed the type for the remaining functions like waitpit Christian |
No, it doesn't require that. You could use conditional compilation |
Is this pending for trunk and py3k too or just for 2.5 (and hence can be |
No, I don't think this is actually fixed in any version of Python at the Perhaps we close this as won't fix or I can create a patch to at least |
The following patch should do the trick. |
The patch looks fine to me, please apply. |
Thanks, the patch was committed in r72852, r72853, r72854. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: