rust-lang / rust-lang/libc

Deprecate polyfills and remove in 1.0 (solarish compat `openpty` and `forkpty`, android accept4)

Open
#4,045 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-cleanup E-easy E-help-wanted O-solarish
Dominant language
Rust
Stars
2.6k
Forks
1.3k
Avg merge
1d 22h
Merged PRs (30d)
69

Description

We currently polyfill these functions for solarish in https://github.com/rust-lang/libc/blob/3a0b0444d7206aa3feb30297c005597a960d0b33/src/unix/solarish/compat.rs, but it would be better to phase these out so we're not providing any implementations in libc.

It looks like Solaris supports openpty and forkpty https://docs.oracle.com/cd/E88353_01/html/E37843/openpty-3c.html, and Illumos has had them for at least a few years https://www.illumos.org/issues/5386, so at this point our implementation could be replaced with bindings.


Similar for Android (there are a few definitions) https://github.com/rust-lang/libc/blob/1268c28d23296abc7ff9f7ba78c8903c5ccea356/src/unix/linux_like/android/b32/x86/mod.rs#L549-L568

And vxworks

https://github.com/rust-lang/libc/blob/257f77c6f0df0bb8dbc55f7ceff87b8cd79d22ae/src/vxworks/mod.rs#L2436-L2457

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading src/unix/solarish/compat.rs and the Android definitions in src/unix/linux_like/android/b32/x86/mod.rs, then inspect the corresponding vxworks definitions in src/vxworks/mod.rs. Check the linked Solaris and Illumos API references before determining the platform bindings affected. Done means the listed polyfills are phased out and the affected platforms use their native APIs or bindings instead.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.