From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 6 15:34:52 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FBDF16A41F for ; Tue, 6 Sep 2005 15:34:52 +0000 (GMT) (envelope-from erkankolemen@yahoo.com) Received: from web33406.mail.mud.yahoo.com (web33406.mail.mud.yahoo.com [68.142.206.138]) by mx1.FreeBSD.org (Postfix) with SMTP id C2EF943D48 for ; Tue, 6 Sep 2005 15:34:51 +0000 (GMT) (envelope-from erkankolemen@yahoo.com) Received: (qmail 86235 invoked by uid 60001); 6 Sep 2005 15:34:51 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=FezJXBay1Y+u2ragxzzFgElzCyBAAdxU4aR06YoAWLqity6YBlk/TQPKwkc8jr28oQnI+a5NsOg2GWl062HXgqd8pVVOts1LwIb1+Z9n0KQny6l/hrLSIiayPwwu+AmU5tUlvmlVfoEN+7cRzkKkjp7EIuy+8WYkx6hHV/wQ7js= ; Message-ID: <20050906153451.86233.qmail@web33406.mail.mud.yahoo.com> Received: from [85.105.12.111] by web33406.mail.mud.yahoo.com via HTTP; Tue, 06 Sep 2005 08:34:51 PDT Date: Tue, 6 Sep 2005 08:34:51 -0700 (PDT) From: erkan kolemen To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: accept: Invalid argument X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2005 15:34:52 -0000 Hi, In a daemon loop, i am using accept() to accept incoming connections. while(1) { if((fd = accept(socketd, (struct sockaddr *) &addr, &addrlen)) == -1) { syslog(LOG_ERR, "accept: %s", strerror(errno)); continue; } else { ... } accept always fails. What is wrong? i could create socket and i got a positive integer value as socket descriptor. following is from syslog: Sep 6 17:20:50 devel pro[99227]: accept: Invalid argument Sep 6 17:21:20 devel last message repeated 204686 times What is wrong? i am calling accept before fork().. So i don't think child process affecting parent process. thanks and regards... - erkan ______________________________________________________ Click here to donate to the Hurricane Katrina relief effort. http://store.yahoo.com/redcross-donate3/