Coder Social home page Coder Social logo

posix.rs's Introduction

Posix.rs

Posix wrapper for Rust

Docs

Docs

Supported platforms

  • Linux x86 (glibc 2.19+ only)
  • Linux x86_64 (glibc 2.19+ only)

posix.rs's People

Contributors

lummax avatar mahkoh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

posix.rs's Issues

posix::unistd::tcsetpgrp

I'm trying to use the function posix::unistd::tcsetpgrp and I get the error "failed to resolve. Could not find unistd in process::execute::posix". Any suggestions on why it's not working?

My code:

match Command::new(&args[0])
            .stdout(Stdio::inherit())
            .stderr(Stdio::inherit())
            .before_exec(|| {
                unsafe {
                    let pid = libc::getpid();
                    libc::setpgid(pid, pid);
                    posix::unistd::tcsetpgrp(spid, pid);
                }
                Result::Ok(())
            })
            .spawn() {
            Ok(mut child) => {
                match child.wait() {
                    Ok(status) => {
                        status.success()
                    },
                    Err(_) => {
                        println!("failed to wait for child");
                        false
                    },
                }
            },
            Err(_) => {
                println!("Failed to execute");
                false
            },
        }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.