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

unistd: Redesign the enum returned by fork() #332

Merged
merged 2 commits into from
Mar 31, 2016

Commits on Mar 30, 2016

  1. unistd: Redesign the enum returned by fork()

    This commit changes the name of the enum returned by `fork()` to
    `ForkResult`, and changes the `Parent` variant to be struct-like.
    
    The result can be matched like
    
        use nix::unistd::ForkResult::*;
        match fork().unwrap() {
            Parent { child } => { ... }
            Child => { ... }
        }
    
    using the shorthand matching syntax for struct-like enum variants.
    
    This is a breaking change.
    kamalmarhubi committed Mar 30, 2016
    Configuration menu
    Copy the full SHA
    c2acb9e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c2f8bb7 View commit details
    Browse the repository at this point in the history