The Samba-Bugzilla – Attachment 10258 Details for
Bug 10793
selftest incorrectly detects the pid of child processes if the perl value is empty.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
v4-1-test patch
0001-selftest-Fix-selftest-where-pid-is-used-uninitialize.patch (text/plain), 1.33 KB, created by
Andreas Schneider
on 2014-09-05 06:29:08 UTC
(
hide
)
Description:
v4-1-test patch
Filename:
MIME Type:
Creator:
Andreas Schneider
Created:
2014-09-05 06:29:08 UTC
Size:
1.33 KB
patch
obsolete
>From da8ecf6f014b1610be58015456174bcbd2800bb9 Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >Date: Thu, 4 Sep 2014 12:55:53 +0200 >Subject: [PATCH] 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 <asn@samba.org> >Reviewed-by: Stefan Metzmacher <metze@samba.org> > >Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> >Autobuild-Date(master): Thu Sep 4 17:09:17 CEST 2014 on sn-devel-104 > >(cherry picked from commit 6d2f56dbaf84203b351f33179cc3feaf557e0683) >Signed-off-by: Andreas Schneider <asn@samba.org> >--- > selftest/target/Samba.pm | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/selftest/target/Samba.pm b/selftest/target/Samba.pm >index ab3851f..b0817fd 100644 >--- a/selftest/target/Samba.pm >+++ b/selftest/target/Samba.pm >@@ -188,7 +188,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", >-- >2.1.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
metze
:
review+
ddiss
:
review+
Actions:
View
Attachments on
bug 10793
: 10258 |
10259