Questions tagged [boost-process]

Boost.Process is an accepted C++ library that handles processes in an OS-independent way and will be released with boost 1.64

The developer documentation can be found at http://www.boost.org/doc/libs/develop/doc/html/process.html

104 questions
0
votes
1 answer

Boost process open process in new window (Windows)

I'm trying to design a program that uses workers processes - which are just a different program written in C++. I start a worker process like so: auto worker = boost::process::child("./worker.exe"); worker->detach(); The issue is, is that the…
Tom
  • 1,235
  • 9
  • 22
0
votes
1 answer

Is there a way to log the output of a process create via boost::process::spawn?

I know that there is a way with a boost::process::child as described here: boost::asio::boost::asio::io_service ios; std::future data; child c("g++", "main.cpp", //set the input bp::std_in.close(), bp::std_out >…
FlashMcQueen
  • 635
  • 3
  • 13
0
votes
0 answers

How t wait while one process ended with ```boost::process```?

I have main program and system windows calculator. I want to run calculator from main prograM then wait while user close it and then give up control to the main program. I try this solutions: auto child =…
dasfex
  • 1,148
  • 2
  • 12
  • 30
0
votes
3 answers

Using boost process without downloading all the boost framework can it be done?

I need to use a cross-platform library to control child processes. The only mature recommended library I found is boost::process, but I'm new to Boost. I'd like to use this library only, but I'm unsure about how I could do it and if there are other…
user63898
  • 29,839
  • 85
  • 272
  • 514
0
votes
0 answers

Best way to relaunch executable (cross platform)?

Background: So I have client/server type of app rolled into the same executable. What I want is if it fails to connect on the localhost, it should start itself (same executable, but with different parameters/command so to start the server). Then…
darune
  • 10,480
  • 2
  • 24
  • 62
0
votes
1 answer

Why I can't compile asignment for boost::process::on_exit?

Need to set handle function for on_exit event. Tried asignment like in boost tutorial. #include #include using namespace boost::process; using err_code = boost::system::error_code; int main() { child proc("ls -l",…
0
votes
1 answer

Get path to "binary file"/"executable" from pid using boost?

I am trying to write a routine that returns from a given PID path to its binary file or executable, depending on platform. I know it can be done on windows using windows.h, but that is platform dependent solution. I was trying to find a solution…
TStancek
  • 310
  • 1
  • 12
0
votes
1 answer

Moving function from console application to shared library project seem to bring unrelated compilation error

My solution has several c++ console applications. That solution also has a project build as a Static Library (.lib). This library is used in all the console applications for any common functionality. All these project also use various boost…
whoami
  • 1,689
  • 3
  • 22
  • 45
0
votes
1 answer

Unable to correctly spawn Raspberry Pi camera application as child process from C++ app

I'm coding an application on a Raspberry Pi/Raspbian in C++. I create a named pipe (FIFO) with mkfifo() then I start raspiyuv to grab image from my camera. For memory, raspiyuv is the Raspberry Pi command line application that takes still images and…
dom_beau
  • 2,437
  • 3
  • 30
  • 59
0
votes
1 answer

Calling external program using boost::process causes caller to hang (Linux)

I am using boost::process to call an external program - the external program reads input via stdin, and writes to stdout and stderr. The external program is as follows (expects a single argument - the path to a file for debugging) #include…
DaveM
  • 205
  • 1
  • 9
0
votes
0 answers

Calling FFMPEG with Boost.Process

I'm trying to call FFMPEG from my C++ process to stream video from an IP camera. The FFMPEG command I use is ffmpeg.exe -rtsp_transport tcp -i rtsp://10.0.1.21/ONVIF/MediaInput?profile=1_def_profile4 -f image2pipe -pix_fmt rgb24 -vcodec rawvideo -r…
CadentOrange
  • 3,263
  • 1
  • 34
  • 52
0
votes
2 answers

Boost.Process wait_for_exit(child): crash?

I am using version 0.5 of Boost.Process. Documentation can be found here. I am using Mac OS X Yosemite. My problem: I am launching a compilation as a child process. I want to wait for the process to finish. When my child process compiles correctly,…
Germán Diago
  • 7,473
  • 1
  • 36
  • 59
0
votes
1 answer

Declaring a variable of user-defined type for later initialization

I want to create a global variable called process without assigning anything to it in a first moment. Later on I'll spawn a new process in the operating system, and assign it to that variable. It can be done in C# like so: class TestCS { …
Marc.2377
  • 7,807
  • 7
  • 51
  • 95
1 2 3 4 5 6
7