Bug#501411: Took a quick look at this

Michael Casadevall sonicmctails at gmail.com
Fri Oct 10 06:35:05 UTC 2008


Here's the relevant script section:

############################################################
### Test Per Object PostLoopCallbacks

socketpair(Rdr, Wtr, AF_UNIX, SOCK_STREAM, PF_UNSPEC);
my $reader = Danga::Socket->new(\*Rdr);
my $writer = Danga::Socket->new(\*Wtr);
print "# reader: $reader\n# writer: $writer\n";
my $reader_fired = 0;
my $writer_fired = 0;
$reader->SetPostLoopCallback(sub {
    my Danga::Socket $self = shift;
    ok(1, "reader PLC fired");
    $reader_fired++;
    return $reader_fired && $writer_fired ? 0 : 1;
    });
$writer->SetPostLoopCallback(sub {
    my Danga::Socket $self = shift;
    ok(1, "writer PLC fired");
    $writer_fired++;
    return $reader_fired && $writer_fired ? 0 : 1;
    });
Danga::Socket->EventLoop;

I poked through the source of Danga, and didn't see anything obvious
on whats causing this behavior ....
Michael

On Fri, Oct 10, 2008 at 2:23 AM, Russ Allbery <rra at debian.org> wrote:
> "Michael Casadevall" <sonicmctails at gmail.com> writes:
>
>> Taking a closer look at the FTBFS, and the code, it seems the code is
>> trying to open two sockets, and then send data between both of them; I
>> misspoke when I said the internet, and should have said network
>> sockets, I'm not sure if the grid computers would prevent a socket
>> from being opened properly, looking at the test code, it is not
>> specifying a port (although that might not be necessary with
>> socketpair.
>>
>> socketpair(Rdr, Wtr, AF_UNIX, SOCK_STREAM, PF_UNSPEC);
>>
>> It's opening with the sockets with those flags. Any ideas?
>
> This is basically equivalent to pipe() but with larger buffers on many
> hosts.  If that's all the code is doing, it really should succeed.  It
> doesn't require any particular network configuration on the host.
>
> --
> Russ Allbery (rra at debian.org)               <http://www.eyrie.org/~eagle/>
>





More information about the pkg-perl-maintainers mailing list