pipe

Communication with WiX Burn bootstrapper using embedded pipe

别说谁变了你拦得住时间么 提交于 2020-01-03 03:56:09
问题 I'm working on a application, which works on top of WiX bundle, and communicates via embedded pipe (by utilizing ManagedBundleRunner) and receives progress and error updates. Currently I use the standard WiX bootstrapper. However, I will be creating custom managed bootstrapper to implement custom behavior. Part of this new behavior is a bidirectional communication of my application with the bootstrapper. After exploring WiX source (especially Burn engine), I've come up with two approaches: 1)

c++ stream input process

前提是你 提交于 2020-01-03 03:17:05
问题 I want convert text output from one program to Gui output and first program produce line output every microsecond. If I send with pipe command in linux, second program how receive line by line and process that? in another word I have main function in C++ that this parameters is stream and unlimited. Thank you 回答1: Program1: #include <iostream> int main() { std::cout << "Program1 says Hello world!" << std::endl; // output to standard out using std::cout } Program2: #include <iostream> #include

ZMQ源代码分析(一)-- 基础数据结构的实现

拟墨画扇 提交于 2020-01-03 02:41:15
yqueue 和 ypipe zmq号称是”史上最快的消息队列”,由此可见zmq中最重要的数据结构就是队列。 zmq的队列主要由yqueue和ypipe实现。yqueue是队列的基本操作,以下首先分析yqueue的实现。 // Individual memory chunk to hold N elements. // Individual memory chunk to hold N elements. struct chunk_t { T values [N]; chunk_t *prev; chunk_t *next; }; // Back position may point to invalid memory if the queue is empty, // while begin & end positions are always valid. Begin position is // accessed exclusively be queue reader (front/pop), while back and // end positions are accessed exclusively by queue writer (back/push). chunk_t *begin_chunk; int begin_pos; chunk_t *back_chunk;

How does one use the wait() function when forking multiple processes?

落爺英雄遲暮 提交于 2020-01-02 17:29:17
问题 Learning to use the fork() command and how to pipe data between a parent and it's children. I am currently trying to write a simple program to test how the fork and pipe functions work. My problem seems to be the correct use/placement of the wait function. I want the parent to wait for both of its children to finish processing. Here is the code I have so far: int main(void) { int n, fd1[2], fd2[2]; pid_t pid; char line[100]; if (pipe(fd1) < 0 || pipe(fd2) < 0) { printf("Pipe error\n"); return

Redirection at the end of the pipe (C shell)

僤鯓⒐⒋嵵緔 提交于 2020-01-02 10:26:07
问题 I'm trying to make ls | tr a b > text.txt I have piping done, but I can't add STDOUT to the end of the pipe (STDOUT in my case can be only in the last argument) I mark the part of the code, in which redirection should be done, I think that file should be opened, and dup2 method used, but I don't know in which way Methods contains piping - enum reqType { PIPE, STDOUT }; int spawn_proc (int in, int out, char** cmd) { pid_t pid; if ((pid = fork ()) == 0) { if (in != 0) { dup2 (in, 0); close (in)

How do I convert an h.264 stream to MP4 using ffmpeg and pipe the result to the client?

 ̄綄美尐妖づ 提交于 2020-01-02 08:11:30
问题 I have an h.264 encoded stream of video on my server (node.js) and I want to use ffmpeg to convert it to an MP4 stream. Then I want to pipe that MP4 stream from the child process to the client using the response of an HTTP server that I have set up. I am very confused about all the options ffmpeg has and not sure how to pipe the output of the child process to the HTTP response. I have tried several combinations of ffmpeg options but the video does not play in the browser (or show any sign of

Persistent execvp on pipe?

此生再无相见时 提交于 2020-01-02 07:08:53
问题 I am working on an assignment for my Operating System class (Posix & C), building a mini-shell, and I don't know how to solve the following problem: My mini-shell has to accept two commands, for example ls | grep a . For that I create a pipe of size two and a child. The child closes all that it has to close and opens all that it has to open (standard/pipe's in & out). It then executes "ls," using execvp. I am sure this works well. After that, the parent shuts and opens inputs and outputs (I

Persistent execvp on pipe?

你离开我真会死。 提交于 2020-01-02 07:08:28
问题 I am working on an assignment for my Operating System class (Posix & C), building a mini-shell, and I don't know how to solve the following problem: My mini-shell has to accept two commands, for example ls | grep a . For that I create a pipe of size two and a child. The child closes all that it has to close and opens all that it has to open (standard/pipe's in & out). It then executes "ls," using execvp. I am sure this works well. After that, the parent shuts and opens inputs and outputs (I

Unknown method process.openStdin()

℡╲_俬逩灬. 提交于 2020-01-02 02:12:31
问题 I'm trying to pipe grep results into nodejs script. I've found, that I should receive data from process.stdin. Also I've found several ways to work with stdin. But they are different and I can't find all information about it. I know four ways (first 3 start with var data = "" ): 1) Most popular in search results process.stdin.resume(); process.stdin.setEncoding( 'utf8' ); process.stdin.on('data', function(chunk) { data += chunk; }); process.stdin.on('end', function() { console.log('data: ' +

How to filter a lot of data with IPC::Open2?

浪尽此生 提交于 2020-01-01 19:12:30
问题 My task is to filter some data from perl script with external utility (the addr2line). The data size is quite large. I need to print a lot of data to stdin of program and read a lot of data back (from stdout of program into my script). Now I do this with IPC::Open2 , but I don't mix reading and writing. Is this legal? Will Open2 buffer any size of data in pipe? My code: my $cmd="addr2line -e $prog_name "; use IPC::Open2; local (*Reader, *Writer); my $pid = open2(\*Reader, \*Writer, $cmd); for