Opened 9 years ago

Closed 9 years ago

#5452 closed Bug (fixed)

preventing zombies from child scripts

Reported by: g.proskurin Owned by: jordan
Priority: Normal Milestone: 2.82
Component: libtransmission Version: 2.81
Severity: Normal Keywords:
Cc:

Description

Signal handler for SIGCHLD with one waitpid() call is incorrect. Handler can be called once for multiple children, so it should call waitpid() for all children. Hence the patch.

Attachments (1)

tr_zo.patch (440 bytes) - added by g.proskurin 9 years ago.

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by g.proskurin

comment:1 Changed 9 years ago by jordan

  • Component changed from Daemon to libtransmission
  • Milestone changed from None Set to 2.82
  • Owner set to jordan
  • Status changed from new to assigned
  • Summary changed from preventing zombies in transmission-daemon to preventing zombies from child scripts

Sounds good to me.

Similar reference: http://stackoverflow.com/questions/2377811/tracking-the-death-of-a-child-process

Though, it's not clear to me that _cwait has the same semantics. So in addition to this patch let's also remove the win32 ifdef at the top of the file and handle _cwait and waitpid separately so that we can use that loop only in the latter case.

comment:2 Changed 9 years ago by jordan

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in r14156.

Thanks for the patch!

Note: See TracTickets for help on using tickets.