u/Rockytritonin r/C_Programming • Recommends
Using fork, exec and pipe to log a child process
11K subscribers • 8 videos on Hallway
Intermediate. Assumes working knowledge.
1.7K views5 years ago1 recommendation
Systems programmingLinuxOperating systemsC
How to execute a child process in Linux using fork and exec, and redirect its output using pipes in C.
Hi and welcome to the low level devel channel. In this linux systems programming video series, I'm going to be going into detail on some of the shared functions that I create for some of the other video serieses. Many of these are going to be used in the linux distribution from scratch series, but I'm taking some of these functions out into individual units to make the videos smaller and usable by other projects. In this video I'm going to show how to execute a child process, use the pipe syscall to read its stdout and stderr and write those to the parent process's stdout as well as an optional log file. Discord: discord.gg/fyFYABCVMX Github: github.com/rockytriton/LLD Reddit: reddit.com/r/LowLevelDevel Donate (Paypal/Venmo): rockytriton75@gmail.comWhat people say. Recommended as a clear tutorial on using POSIX system calls in C to manage and log child processes.
u/Rockytritonin r/C_Programming • Recommends
u/Rockytritonin r/C_Programming • Mentions
On “freopen("stderr.txt", "rb+,type=mem", stderr);”