Results 1 to 6 of 6
hi all
why my terminal is printing these..
while running a program. in c. in this am using perl script.i.e
FD = popen ("cat .... | grep .... | sed ...
- 06-14-2007 #1Linux Newbie
- Join Date
- Feb 2007
- Location
- hyderabad, india
- Posts
- 247
ps -A and sh <defunct>
hi all
why my terminal is printing these..
while running a program. in c. in this am using perl script.i.e
FD = popen ("cat .... | grep .... | sed 's/^[ \t]*//' | cut -d: -f2 | awk '{print $1}' ", "r");
ps -A
14474 pts/1 00:00:00 sh <defunct>
14648 pts/1 00:00:00 sh <defunct>
14942 pts/1 00:00:00 sh <defunct>
how to avoid these.
is that script causing these..
thank you in advance"Relationships are built on trust and communication"
- 06-14-2007 #2
hi,
if you don't want any output then you can redirect your commands ouput and error to /dev/null file
like
cmd > /dev/null- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
- 06-14-2007 #3Linux Newbie
- Join Date
- Feb 2007
- Location
- hyderabad, india
- Posts
- 247
i did that.. but no use
i am runnig my program in one terminal... in this not printing any... like sh <defunct>[root@localhost count]# ps -A
PID TTY TIME CMD
25056 pts/1 00:00:00 sh <defunct>
25091 pts/1 00:00:00 sh <defunct>
25124 pts/1 00:00:00 sh <defunct>
25157 pts/1 00:00:00 sh <defunct>
25189 pts/1 00:00:00 sh <defunct>
25222 pts/1 00:00:00 sh <defunct>
25254 pts/1 00:00:00 sh <defunct>
25287 pts/1 00:00:00 sh <defunct>
25321 pts/1 00:00:00 sh <defunct>
25354 pts/1 00:00:00 sh <defunct>
25386 pts/1 00:00:00 sh <defunct>
25421 pts/1 00:00:00 sh <defunct>
25453 pts/1 00:00:00 sh <defunct>
25486 pts/1 00:00:00 sh <defunct>
25519 pts/1 00:00:00 sh <defunct>
25545 pts/2 00:00:00 ps
[root@localhost count]#
i opened other terminal and checking ps -A. it is showing like this... if i exit my program..
it will not showing any of these...
how to avoid these ...
thank you in advance."Relationships are built on trust and communication"
- 06-14-2007 #4Linux Enthusiast
- Join Date
- Aug 2006
- Posts
- 631
It seems that you have a bug in your program. These processes are zombie processes.
Provide further information, what would you like to accomplish exactly?
Post a snippet of your code within code blocks.
Regards
- 06-14-2007 #5Linux Newbie
- Join Date
- Feb 2007
- Location
- hyderabad, india
- Posts
- 247
its a daemon process it will excute(FD) continously for every 10 sec.
so that in ps -A
it is showing like that...
but how can i avoid (25056 pts/1 00:00:00 sh <defunct>
25091 pts/1 00:00:00 sh <defunct>...... these i didnt want to show in ps -A)
is there any way
thank you inadvance"Relationships are built on trust and communication"
- 06-14-2007 #6
i think u are creating background process for every 10 sec...if so , then i don't think you can hide them from ps -a ....if you don't want any process then you can kill them.
- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------


Reply With Quote
