Referring to following code example, I want the main thread to supply the number num that the child thread is expecting using scanf. I tried this way ...
Referring to following code example, I want the main thread to supply the number num that the child thread is expecting using scanf. I tried this way ...
I'm currently having problems with the following exercise: I want to "mimic" the pipe command line ls | wc in linux bash with the following program. ...
I'm in an operating systems course and doing assignments with C on Linux. In one of the assignments I was supposed to redirect and output to a file, b ...
So my program needs to pipe multiple processes and read the number of bytes each process output has. The way I implemented it, in a for loop, we have ...
Hi I have a C programme that is basacally suppose to simulate the pipe function in linux and write the amount of bytes that are read in a .txt file so ...
how would I make it so that the fd of stdin returns to its original "file destination"? Could this be accomplished by originally forking, doing what I ...
I'm porting a Linux program to a system which has no fork(), so everything runs in a single process. This program creates pipe, redirects stdout to pi ...
From what I can see there is a lot of info on piping and file redirection. But I can't find anything specific about doing both piping and file redirec ...
I have a System Controller that is nested under my Site Controller. I want to .dup a system, but I am getting "Couldn't find System without an ID" err ...
I was trying to solve this problem for school project but I couldn't understand how to open and close the read and write within the pipe: the question ...
I have a problem with dup and dup2. I don't understand why the data from my file file1 is displayed on the screen because dr is standard input and ...
I have a problem with dup2 syscall. I added a while loop(a part of my program) that running over a students directory, each student has a "c" file tha ...
I am writing a porgram with takes two arguments - the name of commands. The program should redirect the output of the first to a file 'tmp' than execu ...
I'm writing a code that echo a string and sed it two times. My output is correct, but when I try to place that string on an array it blocks on read an ...
I'm writing a function that echo an input to a sed and then another sed. I thinck i used all my wait signal in the right way but the last print i can ...
When I compile and run the following code: the output is the following: It looks like the output of date is written twice and it gets overlapped ...
I have a question regarding multiple redirections. As what I have for now writes in file1.txt only. I have to implement echo hello > file1.txt > ...
I want the child process to listen in a loop the parent process. If it receives "exit" from the parent it terminates and if it receives "cmd" will rea ...
i'm sure of my difficulty but not of the reason for it, so my title might not be a good question for this problem :/ i'm creating a function that wor ...
Using the advise found here: Restoring stdout after using dup I tried to restore the stdin and stdout. However, when using printf to check if stdout w ...