Git Product home page Git Product logo

Comments (13)

klemens-morgenstern avatar klemens-morgenstern commented on June 4, 2024

Isn't OSX posix based?

While until now only testing on linux, I tried to adhere to the posix-standard, not the linux implementation.
That is why a few things are optional, such as vfork. So if there is either something not posix-compliant in the library, it would technically be a bug, If it's a OSX specific detail, I'd like to add workarounds for that.

from boost-process.

mjcaisse avatar mjcaisse commented on June 4, 2024

Hi -
We are scrambling around trying to hit some deadlines. I have this on my list to get back to you. I suspect just trying to run the tests will fail. There are missing includes for one.

Meanwhile, I've backed up to the tried and true 0.5 version. What you have looks promising so I want to get back to providing more information.

from boost-process.

klemens-morgenstern avatar klemens-morgenstern commented on June 4, 2024

Perfect. I'll see if I find a way to test this on MacOS. And I guess once that works, some Solaris user will complain.

from boost-process.

klemens-morgenstern avatar klemens-morgenstern commented on June 4, 2024

I just looked over the include and compared them to the open group documentation.

This had only two issues:

sysexits.h

This is for some reason included and not used (I think)

wait.h

I seem to have missed this, it should be <sys/wait.h> not just <wait.h>

Are there any more include issues you get?

from boost-process.

klemens-morgenstern avatar klemens-morgenstern commented on June 4, 2024

So, I changed the includes to be posix-conforming, i.e. remove sysexits.h and changes wait.h to sys/wait.h. As far as I can see, that makes at least the includes posix-conforming. If you by any chance get a opportunity to test that, the commit is 4d679fb.

from boost-process.

klemens-morgenstern avatar klemens-morgenstern commented on June 4, 2024

@mjcaisse Any news? Btw: the formal review is next week, so you'd help me out a great deal if you test it on OSX.

from boost-process.

klemens-morgenstern avatar klemens-morgenstern commented on June 4, 2024

See PR #46.

from boost-process.

klemens-morgenstern avatar klemens-morgenstern commented on June 4, 2024

Based on PR #46 I tried to build a fix in 663fc69. , but I can't test it. If you find the time, I'd be very grateful if you take a look.

from boost-process.

klemens-morgenstern avatar klemens-morgenstern commented on June 4, 2024

I'm assuming it is supported now as of 2a7f5bb. Feel free to reopen this issue if anything doesn't work properly on OSX.

from boost-process.

avaskoog avatar avaskoog commented on June 4, 2024

I may be doing something wrong, but it doesn't work for me at all on Mac. I've followed all the examples, and everything compiles and runs (tho I had to add an #include for boost::filesystem's operations.hpp into boost::process's operations.hpp to resolve a missing reference), and exit status is fine.

The weird thing is that even if I try to run programs that don't exist, I still get a process ID for the child.

Tried simple things like touching files in the home directory using the full path, but even that didn't work, which of course it does if I try to run the exact same command in the terminal.

Essentially what I'm doing is this:

boost::process::context ctx;
ctx.work_directory = boost::filesystem::current_path().string();
ctx.environment = boost::process::self::get_environment();

std::vector<std::string> args;
args.emplace_back("xcode4");

auto c(boost::process::launch("premake5"s, args, ctx));
c.wait();

I also tried passing boost::process::find_executable_in_path("premake5") instead, which does give me the correct full path, but it still doesn't work.

I have no pointers. It's just... silently failing.

from boost-process.

klemens-morgenstern avatar klemens-morgenstern commented on June 4, 2024

@avaskoog I know what you're doing wrong, you're using an ancient version of boost.process.

from boost-process.

avaskoog avatar avaskoog commented on June 4, 2024

Now that's embarrassing. Got the latest from this repo and there we go. Can confirm it works like a charm on Mac. So is it using NSTask now, or still the general POSIX thing?

from boost-process.

klemens-morgenstern avatar klemens-morgenstern commented on June 4, 2024

Pure posix, just a few workarounds for OSX.

from boost-process.

Related Issues (20)

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.