Skip to content

apple: Add openpty(3) and forkpty(3) #202

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

Merged
merged 1 commit into from
Mar 9, 2016

Conversation

kamalmarhubi
Copy link
Contributor

No description provided.

@kamalmarhubi kamalmarhubi force-pushed the openpty branch 2 times, most recently from cc7e25c to 750c1bb Compare February 28, 2016 17:22
@alexcrichton
Copy link
Member

Thanks! Right now the scope of this library doesn't include libutil on Unix, but we can perhaps propose an amendment to that RFC to include it. Is this library part of the POSIX spec or something like that? Or is it just "random artifact" lying around on most Unix distributions?

@kamalmarhubi
Copy link
Contributor Author

Ah I misunderstood your reply to #195 maybe! Linux man page says

These are BSD functions, present in glibc.  They are not standardized
in POSIX.

They're available on Linux and all the bsdlikes; missing on Solaris. On non-OS X, they require linking with libutil. This little page from gnulib docs has a good run-down: https://www.gnu.org/software/gnulib/manual/html_node/openpty.html

@alexcrichton
Copy link
Member

Ok, in that case I think it'd be fine to add these to Linux bindings, but we should leave them out elsewhere for now as they require an extra library to get linked.

@kamalmarhubi
Copy link
Contributor Author

It's OS X that doesn't require linking anything else. For the other platforms, I think libutil is always available, but I'm fine with removing them for now, which I've done.

we can perhaps propose an amendment to that RFC to include it

Would the amendment proposal itself need to be an RFC?

@alexcrichton
Copy link
Member

Oh sorry, but yeah it's fine to add OSX for now if it doesn't require more libs. Also looks like the failure here was spurious, so I'll restart the build.

Would the amendment proposal itself need to be an RFC?

Not necessarily a full fledged RFC itself, but a PR to the RFCs repo for sure.

@kamalmarhubi
Copy link
Contributor Author

I guess I need to figure out the implications of #[link] attributes. Do they result in downstream users linking those extra libraries? In debug? In release? With lto? Will do some investigation and consider opening an on the RFC to expand scope to include libs that are always available. Eg, for libutil on Linux, it is part of libc, and included in the libc package on Debian.

@alexcrichton
Copy link
Member

The #[link] attribute is unconditionally propagated downwards. It means that basically all Rust programs would only succeed if -lutil worked.

@kamalmarhubi
Copy link
Contributor Author

That's what I thought. I'll survey a few major Linux distros if / when I move to open a PR on the RFC. Thanks for clarifying!

@kamalmarhubi
Copy link
Contributor Author

I opened a PR on the RFC: rust-lang/rfcs#1529

@kamalmarhubi kamalmarhubi changed the title unix: Add openpty(3) and forkpty(3) apple: Add openpty(3) and forkpty(3) Mar 9, 2016
@kamalmarhubi
Copy link
Contributor Author

@alexcrichton could this be merged as is, or should we wait for resolution of the RFC and add it to all platforms at once?

@alexcrichton
Copy link
Member

Let's hold off on this for now until the RFC reaches a conclusion

@kamalmarhubi
Copy link
Contributor Author

👍

@alexcrichton
Copy link
Member

Oh wait sorry I just realized this is only adding for OSX, oh yeah this is fine to merge once CI is green.

alexcrichton added a commit that referenced this pull request Mar 9, 2016
apple: Add openpty(3) and forkpty(3)
@alexcrichton alexcrichton merged commit 04213bb into rust-lang:master Mar 9, 2016
@kamalmarhubi
Copy link
Contributor Author

Oh yeah, should have pointed that out. :-)

kamalmarhubi added a commit to kamalmarhubi/libc that referenced this pull request Mar 31, 2016
The functions were added for Apple in rust-lang#202. Adding them to other
platforms was pending an amendment to RFC 1291 to expand the scope of
libc to include libutil. The amendment was merged as
  rust-lang/rfcs#1529
kamalmarhubi added a commit to kamalmarhubi/libc that referenced this pull request Apr 1, 2016
The functions were added for Apple in rust-lang#202. Adding them to other
platforms was pending an amendment to RFC 1291 to expand the scope of
libc to include libutil. The amendment was merged as
  rust-lang/rfcs#1529
bors added a commit that referenced this pull request Apr 1, 2016
unix: Add openpty(3) and forkpty(3) for non-Apple platforms

The functions were added for Apple in #202. Adding them to other
platforms was pending an amendment to RFC 1291 to expand the scope of
libc to include libutil. The amendment was merged as
  rust-lang/rfcs#1529
kamalmarhubi added a commit to kamalmarhubi/libc that referenced this pull request Apr 2, 2016
The functions were added for Apple in rust-lang#202. Adding them to other
platforms was pending an amendment to RFC 1291 to expand the scope of
libc to include libutil. The amendment was merged as
  rust-lang/rfcs#1529
bors added a commit that referenced this pull request Apr 2, 2016
unix: Add openpty(3) and forkpty(3) for non-Apple platforms

The functions were added for Apple in #202. Adding them to other
platforms was pending an amendment to RFC 1291 to expand the scope of
libc to include libutil. The amendment was merged as
  rust-lang/rfcs#1529
danielverkamp pushed a commit to danielverkamp/libc that referenced this pull request Apr 28, 2020
* Add _mm_[mask_]gatheri32_epi32
* Add _mm[256][_mask]_i32gather_{epi64, pd}
* Add _mm[256][_mask]_gather_ps
* Add _mm[256][_mask]_i64gather_{epi32, epi64, ps, pd}
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.

2 participants