Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Date: Tue, 19 Aug 2003 16:22:53 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: accept() doesn't block while running as NT service Message-ID: <20030819142253.GN3101@cygbert.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <1683 DOT 212 DOT 0 DOT 200 DOT 22 DOT 1061299847 DOT mtc AT mail DOT moldtelecom DOT md> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1683.212.0.200.22.1061299847.mtc@mail.moldtelecom.md> User-Agent: Mutt/1.4.1i On Tue, Aug 19, 2003 at 04:30:47PM +0300, linamat AT moldtelecom DOT md wrote: > I have a problem with accept() on TCP socket. Al things works well when I > start the program under .\\Administrator credentials, but fails in NT > service. > > { > struct sockaddr_in sa; > int sa_len = sizeof sa; > > for (;;) { > > t = accept(s,(struct sockaddr *)&sa,&sa_len); > > if (t == -1) continue; > > // working with client.... > ....... > } > } > > It returns -1 and enters in infinite loop. > I've tried such with UNIX socket and it behaved normally. > Can you explain me why? No. No details, no explanation. Debugging could help. And reading http://cygwin.com/problems.html, probably. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- 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/