thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James E. King, III (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (THRIFT-4065) Document Perl ForkingServer signal restriction imposed by THRIFT-3848 and remove unnecessary code
Date Thu, 02 Feb 2017 19:06:51 GMT

     [ https://issues.apache.org/jira/browse/THRIFT-4065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

James E. King, III updated THRIFT-4065:
---------------------------------------
    Description: 
The Perl ForkingServer sets SIGCHLD to be ignores so that the forks can be automatically reaped,
since the ForkingServer doesn't care about the child exit code.
The fix for THRIFT-3848 was incomplete.  It needs to reset the signal handler in the child
to use a default SIGCHLD handler so any thrift handler implementation relying on SIGCHLD will
execute properly.

Also due to the fact that SIGCHLD is ignored in ForkingServer, the _collectChildren and call
to waitpid() are unnecessary and can be removed, along with the children hash, from _parent().

  was:
The Perl ForkingServer sets SIGCHLD to be ignores so that the forks can be automatically reaped,
since the ForkingServer doesn't care about the child exit code.

This means any perl handler is not allowed to implement its own SIGCHLD handler.  This limitation
is not documented in the perl readme, but it should be.

In addition, the fix for THRIFT-3848 was incomplete.  Due to the fact that SIGCHLD is ignored,
the _collectChildren and call to waitpid() are unnecessary and can be removed, along with
the children hash, from _parent().


> Document Perl ForkingServer signal restriction imposed by THRIFT-3848 and remove unnecessary
code
> -------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-4065
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4065
>             Project: Thrift
>          Issue Type: Bug
>          Components: Perl - Library
>    Affects Versions: 0.10.0
>         Environment: Ubuntu 14.04 LTS, Perl 5.18
>            Reporter: James E. King, III
>            Assignee: James E. King, III
>
> The Perl ForkingServer sets SIGCHLD to be ignores so that the forks can be automatically
reaped, since the ForkingServer doesn't care about the child exit code.
> The fix for THRIFT-3848 was incomplete.  It needs to reset the signal handler in the
child to use a default SIGCHLD handler so any thrift handler implementation relying on SIGCHLD
will execute properly.
> Also due to the fact that SIGCHLD is ignored in ForkingServer, the _collectChildren and
call to waitpid() are unnecessary and can be removed, along with the children hash, from _parent().



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message