This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Problem URGENT with the argument F_SETOWN in the function fcntl


Hello

	I don't known if you have received my mail so I send again it.
	The function fcntl used with the argument F_SETOWN return a value of -1 and the errno indicate that
	"the argument is invalid". 
	However in the include file fcntl.h, this argument exist. (#define F_SETOWN 6  /* Set owner - for ASYNC */ )
	Do you have found this problem already?

int fdsock, arg;
int PORTBASE = 19000;
struct sockaddr_in  socket_in;

fdsock = socket (AF_INET, SOCK_DGRAM, 0);
if (fdsock == -1)
	return(-1);

socket_addr.socket_in.sin_family = AF_INET;
socket_addr.socket_in.sin_port = PORTBASE;
socket_addr.socket_in.sin_addr.s_addr = htonl(INADDR_ANY);

if (bind(fdsock,(struct sockaddr *) socket_addr, sizeof(socket_addr.socket_in))== -1)
  	{
  	close(fdsock);
   	return(-1);
	}

arg = getpid();
fcntl(fdsock, F_SETOWN, arg);	/* PROBLEM */

	See you soon!

>        		     )))((
>            	     (.  .)
> + ----------ooO-(_)-Ooo-----------	+
> +              David DEPERE 		+
> +      mailto:ddepere@cr2a-di.fr  	+
> + -----------------------------------	+



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]