From owner-freebsd-net Fri Mar 2 9:52:24 2001 Delivered-To: freebsd-net@freebsd.org Received: from mirage.nlink.com.br (mirage.nlink.com.br [200.249.195.3]) by hub.freebsd.org (Postfix) with SMTP id 6299B37B71C for ; Fri, 2 Mar 2001 09:52:14 -0800 (PST) (envelope-from paulo@nlink.com.br) Received: (qmail 53283 invoked by uid 501); 2 Mar 2001 17:52:08 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 2 Mar 2001 17:52:08 -0000 Date: Fri, 2 Mar 2001 14:52:08 -0300 (EST) From: Paulo Fragoso To: Wes Peters Cc: freebsd-net@freebsd.org Subject: Re: Deamon with perl In-Reply-To: <3A9FD4C6.230D7EB7@softweyr.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Fri, 2 Mar 2001, Wes Peters wrote: > Paulo Fragoso wrote: > > > > Hi, > > > > I've written a little server using perl, it's working fine using FBSD 4.x > > but when I try with FBSD 3.x it don't work: > > > > bind: Can't assign requested address at ... > > > > I've ever changed all /usr/libdata/perl directory to same used on FBSD > > 4.x, but I've got same error. > > > > Are there any problem with socket and perl on FBSD 3.x? > > Is your daemon trying to bind to a privileged port - i.e. port < 1024? > If so, you're probably running suidperl on 4.x. You have to have root > privs to bind to a port < 1024. No, it's trying to bind to a port > 1024. I've solved this problem changing this line in my code: $local_socket = sockaddr_in($port, inet_aton(INADDR_ANY) ); to $local_socket = sockaddr_in($port,INADDR_ANY ); now is working fine on FBSD 3.x. Thanks, Paulo. > > -- > "Where am I, and what am I doing in this handbasket?" > > Wes Peters Softweyr LLC > wes@softweyr.com http://softweyr.com/ > -- __O _-\<,_ Why drive when you can bike? (_)/ (_) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message