Skip to content

Policy on new system calls? #540

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

Closed
ntninja opened this issue Feb 25, 2017 · 3 comments
Closed

Policy on new system calls? #540

ntninja opened this issue Feb 25, 2017 · 3 comments

Comments

@ntninja
Copy link
Contributor

ntninja commented Feb 25, 2017

I see that the accept4 system call is currently exposed on Linux, but not on FreeBSD, OpenBSD or other system that support it. Here's the Unix compatibility story for that, IMHO quite useful, system call:

  • Linux 2.6.28+ (24.12.2008)
  • FreeBSD 10.0+ (01.02.2014)
  • OpenBSD 5.7+ (01.05.2015)
  • DragonFlyBSD 4.4+ (07.12.2015)
  • BitRig ??? (More that 3 years ago according to git blame on https://github.com/bitrig/bitrig/blame/master/sys/kern/syscalls.c, OTOH the BitRig 1.0 release page says it incorporates changes up to OpenBSD 5.6?, very unclear status in general IMHO…)
  • NetBSD 8.0+ (Hopefully released soonish…)
  • macOS/Darwin Nope, expected anything else?

Should these simply be submitted for any platform that supports them? Will that cause any issues for applications that target older platform?

Possibly related issues: #234

@alexcrichton
Copy link
Member

New functions are definitely welcome! Adding them to this crate doesn't imply that they must be used, so it's up to downstream crates to use them or not. So in that sense PRs are definitely welcome!

bors added a commit that referenced this issue Mar 3, 2017
Add support for the `accept4` system call for FreeBSD* & NetBSD*

As outlined in #540.

However since support for this system call seems to be committed, but not yet released in NetBSD & BitRig (is BitRig actually still be developed at all, btw?), I'm not sure whether it wouldn't be a better idea to only add OpenBSD support instead?
What's the official policy on this?
Susurrus pushed a commit to Susurrus/libc that referenced this issue Mar 26, 2017
…borne

fcntl: Support getting and setting pipe size on Linux
@Susurrus
Copy link
Contributor

Can this be closed since #546 was merged?

@ntninja
Copy link
Contributor Author

ntninja commented Jun 23, 2017

I guess so… The policy is basically "add whatever you want, as long as it exists in some released version of that platform". So the opening question of this issue has indeed been answered in the process of getting the PR merged, yes.

@ntninja ntninja closed this as completed Jun 23, 2017
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

No branches or pull requests

3 participants