Skip to content
Advertisement

Tag: process

How fork() function works in this program?

I’m having some trouble with this program. I know what a fork() function does. It is used to create a new process from an existing process. The new process is called the child process, and the existing process is called the parent. The parent returnes the child’s pid and the child returns 0. That said, I find hard to understand

Limit a set of processes’ CPU and memory usage

Browsing the web has low priority for me, and so I would like all the processes that deal with it to be low priority, too. Is this approach a valid one? Open a console window with the nice command. Launch the browser from this console. Will the program launched from this console inherit the niceness of the console itself? Answer

Programmatically monitor process state using C++

I have to develop an application in C++ to monitor the state of processes in my Linux system and also need to know if a new process is created or an existing process is terminated. Is there an API available for this? Also it will be helpful if someone could tell me how to start it with. Answer inotify works

Start a process in Go and detach from it

I need to start a new process in Go with the following requirements: The starting process should run even after the Go process is terminated I need to be able to set the Unix user/group that’s running it I need to be able to set the environment variables inherited I need control over std in/out/err Here is an attempt: This

Linux, waitpid, WNOHANG, child process, zombie

I running my program as daemon. Father process only wait for child process, when it is dead unexpected, fork and wait again. But when child process being killed with -9 signal, the child process goes to zombie process. waitpid should return the pid of child process immediately! But waitpid got the pid number after about 90 seconds, Here is the

Process permanently stuck on D state [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question

How to terminate process from Python using pid?

I’m trying to write some short script in python which would start another python code in subprocess if is not already started else terminate terminal & app (Linux). So it looks like: Have problem of lacking knowledge to name proces by pid which app reads from file “.proc”. The other problem is that interpreter says that string named dat is

Advertisement