Menu

#13 execute waits for the wrong child + possible memory leak in execute

v1.0 (example)
open
nobody
None
5
2013-11-18
2013-11-18
Xyandir
No

Hi,
in the current version of pidgin (2.10.7) under linux there is a bug which creates zombie-processes.
Unfortunatly the current implementation of the execute command in pidgin-latex only uses wait, therefore it returns immediately.
My solution to fix this, is replacing line 261
"if( wait(&exitstatus)>0)"
with
"if( waitpid(child_id,&exitstatus,0)>0)"
which will wait for the child which was spawned by execute.
And while I was searching through this, I think the line 263 "free(opt);" has to be moved in front of the if, otherwise opt wouldn't be freed when wait has an error.
(sorry that I can't create a diff with the changes, but one piece of software which I don't understand is enough for one day)

1 Attachments

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.