[SCM] Samba Shared Repository - branch master updated

Michael Adam obnox at samba.org
Mon Oct 17 06:48:39 MDT 2011


Hi Andrew,

any clues about the typo SIGCHILD (instead of SIGCHLD) that is
still in selftest.pl? Anyone? I did not have time to think this
through properly, but every now and then I notice that
"make test" keeps telling me:

"No such signal: SIGCHILD at ../selftest/selftest.pl line 179."

Cheers - Michael


Michael Adam wrote:
> 
> Andrew Bartlett wrote:
> > The branch, master has been updated
> >        ...
> >        via  2b47afa selftest: Avoid being run over by armies of the undead
> >        ...
> >       from  fcb90f4 s3-printing: Add forward declaration for dcerpc_binding_handle.
> > 
> > http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
> > 
> > 
> > - Log -----------------------------------------------------------------
> > commit 2b47aface434000b29aa29f4ff6348cc147ae757
> > Author: Andrew Bartlett <abartlet at samba.org>
> > Date:   Tue Jul 26 17:04:40 2011 +1000
> > 
> >     selftest: Avoid being run over by armies of the undead
> >     
> >     Ignore SIGCHILD to reap zombies
> >     
> >     Andrew Bartlett
> >     
> >     Signed-off-by: Andrew Tridgell <tridge at samba.org>
> > 
> > 
> > -----------------------------------------------------------------------
> >  
> > diff --git a/selftest/selftest.pl b/selftest/selftest.pl
> > index 78627c8..5cbb686 100755
> > --- a/selftest/selftest.pl
> > +++ b/selftest/selftest.pl
> > @@ -176,6 +176,8 @@ sub pipe_handler {
> >  
> >  $SIG{PIPE} = \&pipe_handler;
> >  
> > +$SIG{CHILD} = 'IGNORE';
> > +
> >  sub find_in_list($$)
> >  {
> >  	my ($list, $fullname) = @_;
> 
> Ok, there is a typo here that annihilates the intended effect of this patch:
> 
> It is "SIGCHLD" (sometimes also spelled SIGCLD), but _not_ SIGCHILD...
> 
> The only effect of this patch is the additional warning printed
> by make test:
> 
> >>>> No such signal: SIGCHILD at ../selftest/selftest.pl line 179.
> 
> If I change the corrponding line to read "$SIG{CHLD} = 'IGNORE';
> instead, then make test fails completely (at least on the ubuntu
> 10.04 and 10.10 platforms I am working on). This is the effect:
> 
> >>>> Can't ignore signal CHLD, forcing to default.
> >>>> Traceback (most recent call last):
> >>>>   File "/home/obnox/samba-build/source3/selftest/tests.py", line 23, in <module>
> >>>>     from selftesthelpers import *
> >>>>   File "/home/obnox/samba-build/selftest/selftesthelpers.py", line 49, in <module>
> >>>>     if subprocess.call(perl + ["-e", "eval require Test::More;"]) == 0:
> >>>>   File "/usr/lib/python2.6/subprocess.py", line 480, in call
> >>>>     return Popen(*popenargs, **kwargs).wait()
> >>>>   File "/usr/lib/python2.6/subprocess.py", line 1170, in wait
> >>>>     pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
> >>>>   File "/usr/lib/python2.6/subprocess.py", line 465, in _eintr_retry_call
> >>>>     return func(*args)
> >>>> OSError: [Errno 10] No child processes
> >>>> Error creating recipe at ../selftest/selftest.pl line 705.
> >>>> 
> >>>> ALL OK (0 tests in 0 testsuites)
> >>>> 
> >>>> A summary with detailed information can be found in:
> >>>>   ./st/summary
> >>>> SELFTEST FAILED
> >>>> make: *** [test] Error 1
> 
> So, no child processe are created at all (or they are killed immediately).
> This puzzles me slightly, because reading from the documentation, it sounds
> like this setting should be possible on newer systems with exaclty the
> effect intended by your original commit, and it is mentioned that this does
> not work on some older systems.
> 
> So I was not able to fix the typo easily. Maybe we have to install a SIGCHLD
> handler that waits for the child processes?
> (This might be useful anyways to stay portable.)
> 
> Any clues?
> 
> Cheers - Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 206 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20111017/6f79047f/attachment.pgp>


More information about the samba-technical mailing list