erlang - How Do You Determine The PID of the Parent of a Process

erlang - How Do You Determine The PID of the Parent of a Process

I have a process in erlang that is supposed to do something immediately after spawn, then send the result back to the parent when it is finished. How do I figure out the PID of the process that spaw…


How do you kill all Linux processes that are older than a certain age?

I have a problem with some zombie-like processes on a certain server that need to be killed every now and then. How can I best identify the ones that have run for longer than an hour or so?…


How do you kill all current connections to a SQL Server 2005 database?

I want to rename a database, but keep getting the error that 'couldn't get exclusive lock' on the database, which implies there is some connection(s) still active. How can I kill all the connections t…


How do you spawn another process in C?

How do you run an external program and pass it command line parameters using C? If you have to use operating system API, include a solution for Windows, Mac, and Linux.…


python - What's the best way to duplicate fork() in windows?

How do I implement some logic that will allow me to reproduce on Windows the functionality that I have on Linux with the fork() system call, using Python? I'm specifically trying to execute a method…


How can a Java program get its own process ID?

How do I get the id of my Java process? I know there are several platform-dependent hacks, but I would prefer a more generic solution.…


How do you check in Linux with Python if a process is still running?

This question already has an answer here: How to check if there exists a process with a given pid in Python? 11 answers The only nice way I've found is: im…


Parallelize Bash script with maximum number of processes

Lets say I have a loop in Bash: for foo in `some-command` do do-something $foo done do-something is cpu bound and I have a nice shiny 4 core processor. I'd like to be able to run up to 4 do-someth…


resources - Chrome tabs and processes

I was reading googlebooks on chrome, where they talk about why they decided to spin up a process to host browser tab, every time you created a new tab.' So 2 tabs=2 chrome processes 3 tabs=3 chr…


Why is creating a new process more expensive on Windows than Linux?

I've heard that creating a new process on a Windows box is more expensive than on Linux. Is this true? Can somebody explain the technical reasons for why it's more expensive and provide any historic…





process how multiple linux running all windows python kill example