Video is property of their respective owner.
Note: In the following post child process is the process created after first fork() and grand child process is the process created after second fork(). In one of my projects recently I had to run a shell command as a background process. The system was performance intensive, so I had to run a child process and continue execution on the parent process. We were using Python on Ubuntu so initially it seemed very easy. I thought of just using the subprocess library available for python. I started a background process with subprocess.Popen() and not call a Popen.wait() for it because I had to run the shell command in the background. PROBLEM: Initially I thought it worked but when I checked the process tree. I noticed that the child processes completed and entered a < defunct> state were not releasing memory. SOLUTION: After ...
Comments
Post a Comment