Skip to content
Advertisement

Tag: process

Is pipe in linux asynchronous or not?

I thought that when i running below commands Linux process will be when sleep 10 is end -> sleep 2 (when sleep 2 is end)-> sleep 5 that’s i thought But in Linux bash sleep 10, sleep 2, sleep 5 are in ps same time Standard output of sleep 10 process will be redirected to sleep 5’s process But, in

How to list all concurrent python processes in my CLI?

I have opened several terminals in parallel: And in two of those terminals, I have launched a python file, which includes iterations, to keep the process running. And I would like to have the list of all python processes running. When I type: $ ps -ef | grep python or $ps -elf | grep python I only get the current

waitpid() function returns ERROR (-1), why?

I’m writing a Linux shell-like program in C. Among others, I’m implementing two built-in commands: jobs, history. In jobs, I print the list of currently working commands (in the background). In history I print the list of all commands history until now, specifying for each command if it’s RUNNING or DONE. To implement the two, my idea was to have

Fork how many processes created confused

Say i have the following program So now what we have: Fork #1 creates an additional processes. so now we have two processes. Fork #2 is executed by two processes, creating two processes, for a total of four. My confusion is after the first fork we will have two processes P1(parent) and C1 (child). each process will execute the second

Pipe not reading what it should

So I have 2 processes, a client who gets 2 operands and one operation (either + or -), sends them to the second process, the server, who makes the computation, then sends the result back to the client. This is the client: This is the server: There are 3 outcomes to this code. First one is that it works, this

Advertisement