X-Spam-Check-By: sourceware.org Date: Fri, 7 Apr 2006 17:09:36 -1000 (HST) From: Antonio Querubin To: Reid Thompson Cc: cygwin AT cygwin DOT com Subject: Re: getsockname problem In-Reply-To: <44365DE8.4070008@ateb.com> Message-ID: References: <44365DE8 DOT 4070008 AT ateb DOT com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Fri, 7 Apr 2006, Reid Thompson wrote: > well,,, not 'any' other linux system... > > $ ./getsockname > socket = -1 > length = 16 > getsockname rc = -1 > returned length = 16 > getsockname: Bad file descriptor That points out an error in getting the raw socket, not in getsockname() itself. getsockname() can't work on an invalid socket. Maybe you didn't have the right priviledges to get the raw socket on the run above? On most systems you need admin/root priviledges to get the raw socket. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/