Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Error: ioctl: - when setting up incoming mail

Quote Reply
Error: ioctl: - when setting up incoming mail
I am getting the following error when trying to set up incoming mail via shared POP3 on my local PC:

Code:
Error: ioctl: The system detected an invalid pointer address in attempting
to use a pointer argument in a call at
/path/to/gmail/admin/GT/Socket/Client.pm line 167.

Any clues as to what may be causing the problem?

Code:
C:\perl -v

This is perl, v5.8.0 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2002, Larry Wall

Binary build 806 provided by ActiveState Corp. http://www.ActiveState.com
Built 00:45:44 Mar 31 2003
[edit]Upgrading to 5.8.1 didn't help any.[/edit]

Thanks,
Charlie

Last edited by:

Chaz: Nov 30, 2003, 12:26 PM
Quote Reply
Re: [Chaz] Error: ioctl: - when setting up incoming mail In reply to
Well, I got around it for now but I don't know what I screwed up in doing so:

Code:
sub _non_blocking {
$ERROR = undef;
my $self = shift;

if ($^O eq 'MSWin32') {
# 126 is FIONBIO (some docs say 0x7F << 16)
ioctl(
$self,
0x80000000 | (4 << 16) | (ord('f') << 8) | 126,
1
); # or die "ioctl: $^E";
# Commenting out the die seems to get me past it.
}
else {
my $flags = fcntl($self, F_GETFL, 0) or die "getfl: $!";
$flags |= O_NONBLOCK;
fcntl($self, F_SETFL, $flags) or die "setfl: $!";
}

${*$self}{non_blocking} = 1;

return 1;
}

Any ideas on the correct fix (or problem even)?

~Charlie
Quote Reply
Re: [Chaz] Error: ioctl: - when setting up incoming mail In reply to
I got the same error on upgrading to 2.2. I commented out the "die" and it seemed to work for me as well. As you said though, don't know what else that may have damaged.

Hopefully Alex will jump in with some comments.
Quote Reply
Re: [Chaz] Error: ioctl: - when setting up incoming mail In reply to
GT: Any thoughts on this one? I don't want to open a support ticket as this is only for my local testing and not a production site with users. I'd still like to know what might be causing the problem though.

Thanks,
Charlie
Quote Reply
Re: [Chaz] Error: ioctl: - when setting up incoming mail In reply to
Hi Chaz,

Sorry about the delay. I've asked around, but I haven't gotten a definite answer about it. I got referenced to another piece of code that uses ioctl, but I haven't really had a chance to look at it.

Adrian
Quote Reply
Re: [brewt] Error: ioctl: - when setting up incoming mail In reply to
Chaz, try the attached Client.pm.

Adrian
Quote Reply
Re: [brewt] Error: ioctl: - when setting up incoming mail In reply to
Thanks Adrian. That did the trick.

~Charlie