Questions tagged [defunct]
35 questions
34
votes
7 answers
How do I identify and eliminate unused CSS styles from my bloated stylesheet?
I have a legacy stylesheet that is now full of unused styles. The problem is identifying the necessary from the unnecessary. Are there any tools to help with this?

Cornish
- 899
- 2
- 9
- 8
20
votes
1 answer
What is the cleanest way to stop a python multiprocessing worker attached to a queue in an infinite loop?
I'm implementing a producer-consumer pattern in python using multiprocessing.Pool and multiprocessing.Queue. Consumers are pre-forked processes that uses gevent to spawn multiple tasks.
Here is a trimmed down version of code:
import gevent
from…

Vikas
- 8,790
- 4
- 38
- 48
15
votes
6 answers
Why do processes spawned by cron end up defunct?
I have some processes showing up as in top (and ps). I've boiled things down from the real scripts and programs.
In my crontab:
* * * * * /tmp/launcher.sh /tmp/tester.sh
The contents of launcher.sh (which is of course marked…

John Zwinck
- 239,568
- 38
- 324
- 436
14
votes
2 answers
C: Exec/fork > Defunct processes
I'm want to create a lot of child processes using the fork > exec procedure. Many processes are ending very fast (in less than two minutes, some even earlier).
My first problem is, I put the spawn process into the background with
./spawnbot >…

Frank Vilea
- 8,323
- 20
- 65
- 86
7
votes
2 answers
How to cleanly kill subprocesses in python
We are using a python process to manage long running python subprocesses. Subprocesses occasionally need to be killed. The kill command does not completely kill the process, only makes it defunct.
Running the following script demonstrates this…

user7495615
- 73
- 1
- 1
- 5
7
votes
1 answer
init never reaping zombie/defunct processes
On my Fedora Core 9 webserver with kernel 2.6.18, init isn't reaping zombie processes. This would be bearable if it wasn't for the process table eventually reaching an upper limit where no new processes can be allocated.
Sample output of ps -el |…

clark
- 565
- 2
- 5
- 14
5
votes
1 answer
Why nodejs spawn process become until parent exited
Let's see the phenomenon first,
Nodejs code:
const cp = require('child_process');
var ls = cp.spawn('ls', ['/']);
ls.stdout.on('data', (data) => {
console.log(`stdout: ${data}`);
});
ls.stderr.on('data', (data) => {
console.log(`stderr:…

Yuanqiu Li
- 143
- 2
- 9
4
votes
2 answers
Can a child process go without its parent process dying?
kill - does it kill the process right away?
I found my answer and I set up a signal handler for SIGCHLD and introduced wait in that handler. That way, whenever parent process kills a child process, this handler is called and it calls wait to reap…

hari
- 9,439
- 27
- 76
- 110
4
votes
3 answers
kill - does it kill the process right away?
what does kill exactly do?
I have a parent process which is creating 100 (as an example) child processes one after another. At the end of any child's job, I kill the child with kill(pid_of_child, SIGKILL) and I cannot see that in ps output. But if…

hari
- 9,439
- 27
- 76
- 110
4
votes
1 answer
Accurev: easy way to defunct entire directory tree
Is there an quick way to defunct (and then promote) a directory and everything below it in Accurev?

user1071847
- 633
- 9
- 20
3
votes
1 answer
subprocess becomes defunct, `communicate()` hangs
In python 2.7 on Ubuntu 14.04, I launch a process like this:
bag_process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
for i in range(5):
print "Countdown: {}".format(5 - i - 1)
time.sleep(1)
print "Sending SIGINT…

Edward Ned Harvey
- 6,525
- 5
- 36
- 45
3
votes
2 answers
Detecting if a process exits cleanly with Python subprocess
I wrote a python script that's responsible for executing other scripts.
I do notice that every now and then, I get a defunct process.
I was reading some other threads on StackOverFlow and they said that you can catch a problem if .communicate or…

Andre Dixon
- 330
- 4
- 14
2
votes
2 answers
ggmap error : 'get_openstreetmap' is defunct
I'm trying to build a map on R with ggmap library and an osm background however I get the bellow error.
library(ggmap) library(osmdata) library(devtools)
mad_map <- get_map(getbb("Limete, Kinshasa"), maptype = "terrain", source = "osm")
Erreur :…

Coralie
- 187
- 8
2
votes
1 answer
Python kill defunct child process itself
I'm using multiprocessing python lib.
I create new Process and executing my job.
After finishing job, I just call exit(0), but process is 'defunct' state.
I try to kill as 'kill -9 PID', 'kill -18 PID' and etc, but I can't kill child process with…

SungMin Jung
- 23
- 2
2
votes
2 answers
Is there any way to restart or recover the process if it goes into defunct state?
My django+ngnix application server goes down frequently without proper information. So I checked the logs and can see the process goes into defunct state.
3072 ? 00:18:41 uwsgi
4045 ? 01:00:56 uwsgi Defunct
So restarted the process and worked for…

Joseph Davis
- 118
- 1
- 14