Skip to main content

All Questions

Tagged with
0 votes
0 answers
44 views

Why is a quote in parameter of Pipe automatically added?

I have a strange problem: When using a command in terminal, everything works fine. When using Pipe command with same parameters, system is failing because of quotes. This is the wrapper function I use ...
Peter Silie's user avatar
0 votes
0 answers
37 views

How to launch a program and have a pipe to both stdin and stdout in C on linux [duplicate]

I'm trying to write a C program to configure lemonbar, a status-bar for linux, and i'd like to have the bar be interactive. The problem is that to write to the bar you have to use the program stdin ...
Eto on a mill's user avatar
1 vote
1 answer
50 views

Problem with redirecting output and input streams between processes

I'm writing a pipe analogue in c. It crashes when there is more than one '|' and the other processes have to read the output of the previous one. #define _GNU_SOURCE #include <stdint.h> #include ...
Tameris Isamidinova's user avatar
0 votes
0 answers
40 views

Howto use C++ do pipe run python and capture stdout/stderr output?

We know that python supports running some short statements with the -c command line without creating a .py script file. In addition, python can also be started through the command line pipeline, ...
user23034428's user avatar
0 votes
0 answers
90 views

Three processes using Pipes is not running third process

I am working on a project for a computer architecture class, and I can't figure out why the third process in my C code is not running. I was given a skeleton code by the TA, and I went to an extra ...
Samantha Garcia's user avatar
1 vote
1 answer
72 views

Why `wait` for the child when `read` could supposedly block the parent process in pipe?

I was learning pipe and communication between processes and I saw the following code to ping-pong a byte between parent and child processes: int main(int argc, char **argv) { int p[2]; char ...
Overstacked's user avatar
0 votes
2 answers
469 views

How to pass data from parent process to child's stdin using pipe in c/c++?

Original question Hey, everyone, I am currently learning how to manage processes in C/C++ with the unistd.h library. Here is the scheme of what I am trying to do. I use fork() function to create a ...
Demo_13B's user avatar
0 votes
0 answers
19 views

Catching errors from subprocess.Popen when piping stdout to next Popen stdin

I'm trying to 'chain' multiple Popen subprocesses, and catch any errors thrown by each command. I'm using Python 3.7. This is an example of some of the code I'm trying to use: import subprocess from ...
Graham Etherington's user avatar
0 votes
0 answers
186 views

Pipe problem? cat | cat | ls doesn't work in my minishell

me and a friend are working on creating a minishell. We ran into some issues on the cat | cat | ls part and couldn't figure out what the cause is. Instead of displaying the output of ls right after ...
ThatRandomGuy's user avatar
0 votes
0 answers
46 views

I think there is unintended end and not working well

#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <signal.h> #include <string.h> #include <sys/types.h> #include <sys/wait.h> #include <...
kkwadk's user avatar
  • 1
1 vote
2 answers
129 views

[SOLVED]create a child process with STDIN and STDOUT as being piped in UTF-16

I have created a child process with the use of CreateProcessW function which has pipes to be as the STDOUT and STDIN between itself and its parent process. I am not able to use WriteFile and ReadFile ...
Iman Abdollahzadeh's user avatar
0 votes
1 answer
90 views

Child process and parent process alternating

I am trying to do a problem that says: Implement biderectional communication using one pipe by sycronizing the communication using two semaphores. I have been trying for a while now but to no luck. ...
ruscanca's user avatar
2 votes
1 answer
87 views

Problem with process reading from unnamed pipe or updating variable in shared memory C, linux

First thing, thanks for reading and trying to help! This is a multi-process and multi-threaded code in C. It involves creating multiple worker processes and a dispatcher thread that communicates with ...
Duarte Neves's user avatar
1 vote
1 answer
184 views

Problem with threads and unnamed pipes in C, linux

First thing, thanks for reading and trying to help! In the following code it is meant to create 5 Worker Processes and be listening (read) some information from a unnamed pipes that is passed as an ...
Duarte Neves's user avatar
0 votes
2 answers
249 views

why i can't read from the pipe in C?

I have a program where I create two children for two comparison methods (by dictionary and by length) but when I want the answer from one of the pipes (there are two pipes for each process) the ...
Yam Horin's user avatar

15 30 50 per page
1
2 3 4 5
27