Re: accept doesn't block while running as NT service

2003-08-22 Thread linamat
As Corinna said "debugging could help" and she was right. One of my functions closed file descriptors 0 and 1 after successfull listen() call. Socket fd is 0 in my case. And so accept()'s errno was EBADF. Now my service is working. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simpl

Re: accept() doesn't block while running as NT service

2003-08-21 Thread Nedko Arnaudov
Corinna Vinschen <[EMAIL PROTECTED]> writes: > On Wed, Aug 20, 2003 at 06:10:06PM +0300, Nedko Arnaudov wrote: >> Corinna Vinschen <[EMAIL PROTECTED]> writes: >> >> > On Wed, Aug 20, 2003 at 11:23:01AM +0300, Nedko Arnaudov wrote: >> >> Process that is run under local system credentials cannot us

Re: accept doesn't block while running as NT service

2003-08-20 Thread linamat
SYSTEM can use network resources without doubts, because UNIX domain socket works under NT service, inetd also works as NT service. Turning to accept() problem errno was set to EBADF. I parsed fhandler_socket.cc's method accept(); there are 2 places where EBADF might be set: 1st after sock_event h

Re: accept() doesn't block while running as NT service

2003-08-20 Thread Corinna Vinschen
On Wed, Aug 20, 2003 at 06:10:06PM +0300, Nedko Arnaudov wrote: > Corinna Vinschen <[EMAIL PROTECTED]> writes: > > > On Wed, Aug 20, 2003 at 11:23:01AM +0300, Nedko Arnaudov wrote: > >> Process that is run under local system credentials cannot use > >> network. This is why ot is called *local*. Do

Re: accept() doesn't block while running as NT service

2003-08-20 Thread Nedko Arnaudov
Corinna Vinschen <[EMAIL PROTECTED]> writes: > On Wed, Aug 20, 2003 at 11:23:01AM +0300, Nedko Arnaudov wrote: >> Process that is run under local system credentials cannot use >> network. This is why ot is called *local*. Don't know if this WinNT >> behaviour can be customized. > > That's wrong.

Re: accept() doesn't block while running as NT service

2003-08-20 Thread Corinna Vinschen
On Wed, Aug 20, 2003 at 11:23:01AM +0300, Nedko Arnaudov wrote: > Process that is run under local system credentials cannot use > network. This is why ot is called *local*. Don't know if this WinNT > behaviour can be customized. That's wrong. How should eg. sshd work then? Corinna -- Corinna V

Re : accept() doesn't block while running as NT service

2003-08-20 Thread linamat
But if I do CreateService() with NT AUTHORITY\NetworkService, or if I try to setuid() (cygwin-1.3.22) to switch to .\\Administrator privileges from SYSTEM, the problem still remains. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/proble

Re: accept() doesn't block while running as NT service

2003-08-20 Thread Nedko Arnaudov
Process that is run under local system credentials cannot use network. This is why ot is called *local*. Don't know if this WinNT behaviour can be customized. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation:

Re: accept() doesn't block while running as NT service

2003-08-19 Thread linamat
The problem exists under Win2k sp4, cygwin-1.3.22 and cygwin-1.5.2. Anyhow an explanation would be much appreciated. I've read cygrunsrv last version and inetd sources, but couldn't find any error in my code. Some parameters from CreateService() which I used: SERVICE_WIN32_OWN_PROCESS ".\\LocalS

Re: accept() doesn't block while running as NT service

2003-08-19 Thread help-octave-request
Your message has been received, but you are not subscribed to the help-octave mailing list using the address from which you sent your mail, so your message will not be posted automatically. If the list moderator decides your message is appropriate for the purposes of the list, then it will be post

Re: accept() doesn't block while running as NT service

2003-08-19 Thread Corinna Vinschen
On Tue, Aug 19, 2003 at 04:30:47PM +0300, [EMAIL PROTECTED] 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 (;

accept() doesn't block while running as NT service

2003-08-19 Thread linamat
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;