in reply to Re^6: How to Multiplex a Client using IO::Select
in thread How to Multiplex a Client using IO::Select

Update: Removing the calls to ioctl removes the crash and makes the module work. I don't know at what cost, though.

Do you mean the two ioctl calls inside the module? Or were there some in your code above that you've removed?

If the former, then I think that things may be improved, if not fixed, by changing

ioctl($client, 0x8004667e, 1);

to

my $true = 1; ioctl($client, 0x8004667e, \$true );

I've certainly had code where a similar change prevented traps in the past. I'm not sure if the same is necessary for the ioctl($client, 0x8004667e, 0); case. I'm still a bit perplexed by the logic in the module, and the need for that latter call?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^8: How to Multiplex a Client using IO::Select
by ikegami (Patriarch) on Oct 13, 2008 at 14:55 UTC
    Yes, the two ioctl calls inside the module. And I tried what you suggest and got bad file descriptor errors. Didn't look from what. I didn't care anymore at that point, since the module is obviously not going to be used here.