This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

defunct process

Old posts that have not been replied to for several years.
Locked
t
tR
Voice
Posts: 19
Joined: Wed Dec 12, 2001 8:00 pm

defunct process

Post by tR »

i have following code:
set host [lindex [string tolower $text] 0]
set hostpath "/usr/local/bin/host"
set input [open "|$hostpath $host "]
while {![eof $input]} {
set tmp [gets $input]
putchan $channel "$tmp"
}
problem is that i got on shell:
tR 21964 0.0 0.0 0 0 ? Z May04 0:00 [host <defunct>]
tR 21977 0.0 0.0 0 0 ? Z May04 0:00 [host <defunct>]
processes after executing that a few times.
Someone knows how to fix/avoid that?
Thanx in advance, tR
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Yes - after you have finished outputting the information to IRC, you need to close the file pointer to the program, so it returns.

Use

Code: Select all

close $input
After the while loop.
Locked