Comments (13)
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.
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.
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.
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.
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.
@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.
See PR #46.
from boost-process.
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.
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.
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 touch
ing 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.
@avaskoog I know what you're doing wrong, you're using an ancient version of boost.process
.
from boost-process.
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.
Pure posix, just a few workarounds for OSX.
from boost-process.
Related Issues (20)
- file descriptor leak on linux HOT 2
- avoid crash on linux HOT 1
- Typo in doc: boost-process/doc/concepts.qbk
- Extra warnings on MSVC 2019 HOT 1
- Enable ability to set the job object to kill children processes if the parent dies HOT 4
- Linux: on_exit error when using synchronous calls HOT 3
- _env_impl update missing in reload() in native_environment_impl<wchar_t>
- CLang in Windows reports non-void function does not return a value HOT 1
- Zombie process In Boost:: process::wait_until(wait_for_exit.hpp) HOT 6
- opstream::close() does not close the underlying pipe as I would have expected HOT 1
- wait_for waits until timeout if there is a second child process HOT 1
- two children with closed pipes hang causes wait_for to timeout and return false HOT 1
- [question] will this resolve ASIO not safe when call fork issue? HOT 3
- Group wait does not wait for demonized processes on Linux HOT 1
- Win32: Incorrect handling of GetEnvironmentVariable return value HOT 1
- env.hpp is not standalone HOT 1
- Compilation fails with '/permissive-' in Boost 1.75.0 when "boost/process/group.hpp" is included
- How can I read the output of 'socat' command using boost::process::system ? HOT 1
- Pipe_out not implement uses_handles. HOT 1
- Need a way to obtain pid_t of the current process HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boost-process.