Category "fork"

Different C++ fork() behavior between CentOS 7.5 & RockyLinux 8.4, Ubunu 20.04

I'm working with some legacy code. It works fine on a CentOS 7 system. The args array gets hosed on both a Rocky 8.4 and Ubuntu 20.04 system. I've simplified th

No output in the parent process without fflush(stdout)

I'm trying to understand what is behind this behaviour in my parent process. Basically, I create a child process and connect its stdout to my pipe. The parent p

Different behaviors between C and Rust code snippets

I have a C code snippet which uses pipe() and fork() to communicate between parent and child process. I want to replicate it in Rust. For the POSIX APIs used in

/usr/bin/cat: -: Bad file descriptor when using pipe()

I am recreating a complete shell. For that I must simulate "|". To do this, I have to use the dup2(), fork() and pipe() functions. here is my code : void do_pip

why child can't send signal to parent

parent: volatile int signalval = 0; void signal_handle_c(int sig_num) { printf("child SIGUSR1 ok\n"); signalval = 1; }; int main(int argc,char**argv){

How to find forks of a repository in Azure DevOps

In GitLab I am able to see who has forked my repository by clicking the following link: Does anyone know if there is a similar capability within Azure DevOps?

Having problem Understanding fork() hierarchy tree

I have this Code that I can't understand. I understood the basics of fork() but I don't understand the Hierarchical tree for this process. The code is like this

Why is sleep in a child process blocking my program?

So I have this simple program that sleeps for 4 second if the value returned by fork is '0' meaning that the child process is executing, I've tried using sleep

Duplicate process without fork

In linux embedded system I can see in ps 2 processes of the same binary(pid1=X, pid2=Y) those processes don't have threads(/proc/X/task and /proc/Y/task don't e

What To Do Failed Compiling?

I am getting an error while running the command npm start. The file is created in PancakeSwap Frontend and I've been trying to fix this for a while, thanks for

IPC::Run - Detection of premature child exit and closed pipes

I would like to use IPC::Run to communicate with child via child's STDIN, STDOUT and STDERR (start, pump, finish). It seems to work. I would like to know how

How can I use foreach and fork together to do something in parallel?

This question is not UVM specific but the example that I am working on is UVM related. I have an array of agents in my UVM environment and I would like to launc