All Questions
398
questions
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 ...
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 ...
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 ...
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, ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 <...
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 ...
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. ...
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 ...
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 ...
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 ...