Skip to content
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

Add missing methods to unix ExitStatusExt #79982

Merged
merged 14 commits into from
Jan 14, 2021
Merged

Commits on Jan 13, 2021

  1. unix ExitStatus: Do not treat WIFSTOPPED as WIFSIGNALED

    A unix wait status can contain, at least, exit statuses, termination
    signals, and stop signals.
    
    WTERMSIG is only valid if WIFSIGNALED.
    
    https://pubs.opengroup.org/onlinepubs/9699919799/functions/wait.html
    
    It will not be easy to experience this bug with `Command`, because
    that doesn't pass WUNTRACED.  But you could make an ExitStatus
    containing, say, a WIFSTOPPED, from a call to one of the libc wait
    functions.
    
    (In the WIFSTOPPED case, there is WSTOPSIG.  But a stop signal is
    encoded differently to a termination signal, so WTERMSIG and WSTOPSIG
    are by no means the same.)
    
    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    5b1316f View commit details
    Browse the repository at this point in the history
  2. unix ExitStatus: Clarify docs for .signal()

    We need to be clear that this never returns WSTOPSIG.  That is, if
    WIFSTOPPED, the return value is None.
    
    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    12d62aa View commit details
    Browse the repository at this point in the history
  3. unix ExitStatus: Provide .into_raw()

    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    530270f View commit details
    Browse the repository at this point in the history
  4. unix ExitStatus: Provide .core_dumped

    This is essential for proper reporting of child process status on Unix.
    
    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    3f05051 View commit details
    Browse the repository at this point in the history
  5. unix ExitStatus: Provide .stopped_signal()

    Necessary to handle WIFSTOPPED.
    
    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    f060b9e View commit details
    Browse the repository at this point in the history
  6. unix ExitStatus: Provide .continued()

    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    42ea8f6 View commit details
    Browse the repository at this point in the history
  7. Replace Ie with In other words

    Co-authored-by: Joshua Nelson <joshua@yottadb.com>
    ijackson and Joshua Nelson committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    29c851a View commit details
    Browse the repository at this point in the history
  8. Replace Ie with In other words

    Co-authored-by: Joshua Nelson <joshua@yottadb.com>
    ijackson and Joshua Nelson committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    06a405c View commit details
    Browse the repository at this point in the history
  9. unix ExitStatus: Add tracking issue to new methods

    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    fa68567 View commit details
    Browse the repository at this point in the history
  10. ExitStatusExt unix: Retrospectively seal this trait

    As discussed in rust-lang#79982.
    
    I think the "new interfaces", ie the new trait and impl, must be
    insta-stable.  This seems OK because we are, in fact, adding a new
    restriction to the stable API.
    
    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    7012194 View commit details
    Browse the repository at this point in the history
  11. ExitStatusExt windows: Retrospectively seal this trait

    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    f3e7199 View commit details
    Browse the repository at this point in the history
  12. Fix typo saeled -> sealed

    dtolnay authored and ijackson committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    efddf59 View commit details
    Browse the repository at this point in the history
  13. ExitStatusExt: Fix build on Fuchsia

    This is not particularly pretty but the current situation is a mess
    and I don't think I'm making it significantly worse.
    
    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    05a88aa View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2021

  1. Configuration menu
    Copy the full SHA
    a8d0161 View commit details
    Browse the repository at this point in the history