The branch, master has been updated
       via  6d2f56d selftest: Fix selftest where pid is used uninitialized.
      from  0b4a3b7 s4-rpc: dnsserver: return DNS_RANK_NS_GLUE recors when 
explicitly asked for

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 6d2f56dbaf84203b351f33179cc3feaf557e0683
Author: Andreas Schneider <[email protected]>
Date:   Thu Sep 4 12:55:53 2014 +0200

    selftest: Fix selftest where pid is used uninitialized.
    
    On my system this gets evaluated to 0 so in the end we detect samba to
    be running cause $childpid is set to 0.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=10793
    
    Signed-off-by: Andreas Schneider <[email protected]>
    Reviewed-by: Stefan Metzmacher <[email protected]>
    
    Autobuild-User(master): Andreas Schneider <[email protected]>
    Autobuild-Date(master): Thu Sep  4 17:09:17 CEST 2014 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 selftest/target/Samba.pm |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/target/Samba.pm b/selftest/target/Samba.pm
index d33c1d6..2bd90ae 100644
--- a/selftest/target/Samba.pm
+++ b/selftest/target/Samba.pm
@@ -190,7 +190,12 @@ sub get_interface($)
 sub cleanup_child($$)
 {
     my ($pid, $name) = @_;
-    my $childpid = waitpid($pid, WNOHANG);
+    my $childpid = -1;
+
+    if (defined($pid)) {
+        $childpid = waitpid($pid, WNOHANG);
+    }
+
     if ($childpid == 0) {
     } elsif ($childpid < 0) {
        printf STDERR "%s child process %d isn't here any more\n",


-- 
Samba Shared Repository

Reply via email to