Subject: Re: Possible ioctl() bug.
To: None <current-users@sun-lamp.cs.berkeley.edu, gregc@edi.com>
From: None <mycroft@gnu.ai.mit.edu>
List: current-users
Date: 05/23/1994 08:12:55
   The following line of code works fine:
           ioctl(fd, FIOASYNC, 0);
   Where fd is a file descriptor returned from a call to socket(). However,
   the following piece of code:
           ioctl(fd, FIOASYNC, 1);
   returns -1 with errno set to EFAULT.

You're supposed to make the third argument a *pointer*.  Something like:

int one = 1;
ioctl(fd, FIOASYNC, &one);

I'm not sure why it would work at all with a null pointer.  Perhaps
you're misinterpreting.


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