Re: Trouble with inetd (start but doesn't work)

2002-04-18 Thread Andrew DeFaria

Oops! Server problems. Sorry for the multiple post.

Andrew DeFaria wrote:

> Auricom wrote:
>
>> Hello,
>>
>> Here is my configuration:
>>
>> Win2K Server Version 5.00.2195 (no pack applied)
>> Cygwin 1.3.10
>>
>> The problem is inetd start but I can't telnet or ftp into my 
>> computer. The answer is "connection refused" when I try to connect to 
>> localhost or from the net...
>>
>> When I use ncftp, I have this message:
>>
>> Administrateur@AURICOM : ncftp localhost
>> NcFTP 3.1.3 (Mar 27, 2002) by Mike Gleason ([EMAIL PROTECTED]).
>> Could not connect to 127.0.0.1: The socket is not connected.
>> Could not open host localhost: could not connect to remote host.
>>
>> We can see that the socket is not connected, but I can't find a 
>> solution to solve this issue.
>>
>> Is there a workaround ???
>
>
> Try stopping the inetd server (net stop inetd) then run inetd -d from 
> the command line. In another window attempt a telnet to your machine. 
> Watch to see if you get any messages in the window running inetd. You 
> should. If that works try your ftp command.
>
> I suspect that inetd is not running as a service. Do you have two (yes 
> two, count 'em) inetd processes showing up in the TaskMgr?
>
> Have you added Cygwin's bin to the Windows SYSTEM Environment Variable 
> PATH? Have you rebooted?
>
>
>
>
> -- 
> Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting: http://cygwin.com/bugs.html
> Documentation: http://cygwin.com/docs.html
> FAQ:   http://cygwin.com/faq/
>
>




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




[ANNOUNCEMENT] Updated: bison-1.35-1

2002-04-18 Thread Christopher Faylor

I've made a new version of 'bison' available for download.  This updates
the package to the latest version available from ftp.gnu.org.

For a brief descripton of this package, see
http://cygwin.com/packages/ .

To update your installation, click on the "Install Cygwin now" link on
the http://cygwin.com/ web page.  This downloads setup.exe to your
system.  Then, run setup and answer all of the questions.  To select the
'bison' package, click on the 'Devel' category and then click on the
'skip' field next to 'bison' until 1.35-1 is displayed.

If you have questions or comments, please send them to the Cygwin
mailing list at: [EMAIL PROTECTED] .  I would appreciate it if you would
use this mailing list rather than emailing me directly.  This includes
ideas and comments about the setup utility or Cygwin in general.

If you want to make a point or ask a question, the Cygwin mailing list
is the appropriate place.

  *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

If you want to unsubscribe from the cygwin-announce mailing list, look
at the "List-Unsubscribe: " tag in the email header of this message.
Send email to the address specified there.  It will be in the format:

[EMAIL PROTECTED]

If you need more information on unsubscribing, start reading here:

http://sources.redhat.com/lists.html#unsubscribe-simple

Please read *all* of the information on unsubscribing that is available
starting at this URL.

I implore you to READ this information before sending email about how
you "tried everything" to unsubscribe.  In 100% of the cases where
people were unable to unsubscribe, the problem was that they hadn't
actually read and comprehended the unsubscribe instructions.

If you need to unsubscribe from cygwin-announce or any other mailing
list, reading the instructions at the above URL is guaranteed to
provide you with the info that you need.

Christopher Faylor
Cygwin Engineering Manager (and Developer)
Red Hat, Inc.


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Where is the manual to manually install cygwin in Windiows 2000

2002-04-18 Thread Christopher Faylor

On Thu, Apr 18, 2002 at 09:09:09PM -0400, Larry Hall (RFK Partners, Inc) wrote:
>At 10:25 AM 4/18/2002, George Hester wrote:
>>The last time I tried the installer I did not like the result.  So now
>>I have downloaded all the packages I need evne the docs.  But I see
>>nothing about how to install this manually; what environment variables
>>I should set.  Nothing at all.  All I see is telling me to use the
>>installer.  If I do not want to do this does that mean I cannot install
>>Cygwin in Windows 2000?  Thanks.
>
>OK.  I guess you just somehow missed this:
>
>http://www.cygwin.com/download.html

Coincidentally enough, I just updated this page today.  I got rid of the
mention of bootstrap.zip since it was out of date.  I also updated the
README in the cygwin download directory, removing some obsolete words
and pointing at the above URL if you want to avoid setup.exe.

The README isn't completely up-to-date now but it is a little better.  I
don't know how many people actually read this README.  Apparently not
very many or we would have had complaints about some of the obsolete
info.

cgf

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Where is the manual to manually install Cygwin in Windiows 2000

2002-04-18 Thread Michael A Chase

From: "Larry Hall (RFK Partners, Inc)" <[EMAIL PROTECTED]>
To: "George Hester" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, April 18, 2002 18:09
Subject: Re: Where is the manual to manually install Cygwin in Windiows 2000


> At 10:25 AM 4/18/2002, George Hester wrote:
> >The last time I tried the installer I did not like the result.  So now I
> >have downloaded all the packages I need evne the docs.  But I see nothing
> >about how to install this manually; what environment variables I should
set.
> >Nothing at all.  All I see is telling me to use the installer.  If I do
not
> >want to do this does that mean I cannot install Cygwin in Windows 2000?
> >Thanks.

What didn't you like?  It may have been fixed or you might not understand
the implications of some of your choices.

> OK.  I guess you just somehow missed this:
>
> http://www.cygwin.com/download.html
>
> That explains your options.  Installing by a method other that setup is
> not really supported by this list however.  BTW, there are no *required*
> settings beyond unpacking the software.  But if you want any of the
> additions that setup gives you, that's another argument for just using
> setup.  Of course, the source for setup is available if you'd just prefer
> to look at it to find out what it does.  But you're right.  There is no
> documentation that guides you through a manual install of Cygwin.  It's
> assumed that if you don't use setup, you understand enough about what
> you're doing to just do it.  Either that or you're the adventurous type.
;-)
> Really, there's really no *magic* to setup though...

There are some mount points that _must_ be created for Cygwin to work
reliable and many packages have postinstall scripts that should be run.
Setup.exe will take care of them for you.  Without it you are on your own.

I'm only mentioning these as a caution against what you seem to insist on
doing.  Don't expect any support if you go against all advice.
--
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Where is the manual to manually install Cygwin in Windiows 2000

2002-04-18 Thread Randall R Schulz

George,

I don't know what's not to like about Setup.exe (well, maybe URL-encoded 
mirror directory names), but you're really bucking the tide and going 
against the grain in trying to install without Setup.exe.

You'll also be told (if this message doesn't forestall it) that this list 
doesn't cater to problems with installation or problems originating in 
installation errors for people who don't use the standard installation 
procedure based on Setup.exe.

On the off chance that your poor experience was the result of an earlier, 
less capable or less fully debugged version of Setup.exe, why don't you 
tell us when you last used Setup.exe and why it did not live up to your 
expectations.

Randall Schulz
Mountain View, CA USA


At 07:25 2002-04-18, George Hester wrote:
>The last time I tried the installer I did not like the result.  So now I 
>have downloaded all the packages I need evne the docs.  But I see nothing 
>about how to install this manually; what environment variables I should 
>set. Nothing at all.  All I see is telling me to use the installer.  If I 
>do not want to do this does that mean I cannot install Cygwin in Windows 2000?
>
>Thanks.
>
>--
>George Hester


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Where is the manual to manually install Cygwin in Windiows 2000

2002-04-18 Thread Larry Hall (RFK Partners, Inc)

At 10:25 AM 4/18/2002, George Hester wrote:
>The last time I tried the installer I did not like the result.  So now I
>have downloaded all the packages I need evne the docs.  But I see nothing
>about how to install this manually; what environment variables I should set.
>Nothing at all.  All I see is telling me to use the installer.  If I do not
>want to do this does that mean I cannot install Cygwin in Windows 2000?
>Thanks.


OK.  I guess you just somehow missed this:

http://www.cygwin.com/download.html

That explains your options.  Installing by a method other that setup is 
not really supported by this list however.  BTW, there are no *required*
settings beyond unpacking the software.  But if you want any of the 
additions that setup gives you, that's another argument for just using 
setup.  Of course, the source for setup is available if you'd just prefer 
to look at it to find out what it does.  But you're right.  There is no
documentation that guides you through a manual install of Cygwin.  It's
assumed that if you don't use setup, you understand enough about what 
you're doing to just do it.  Either that or you're the adventurous type. ;-)
Really, there's really no *magic* to setup though...






Larry Hall  [EMAIL PROTECTED]
RFK Partners, Inc.  http://www.rfk.com
838 Washington Street   (508) 893-9779 - RFK Office
Holliston, MA 01746 (508) 893-9889 - FAX


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




fortune-1.8-2.tar.bz2 minor bug

2002-04-18 Thread john . szetela

Hi Cygwin:

The copy of fortune-1.8-2.tar.bz2 I get from planetmirror.com gives a warning message
when I test it with bunzip -t.

I get: 

bsip2: fortune-1.8-2.tar.bz2: trailing garbage after EOF ignored

Not really a problem, but probably re-tarring it would be good.
It installs fine...

John Szetela


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Where is the manual to manually install Cygwin in Windiows 2000

2002-04-18 Thread George Hester

The last time I tried the installer I did not like the result.  So now I
have downloaded all the packages I need evne the docs.  But I see nothing
about how to install this manually; what environment variables I should set.
Nothing at all.  All I see is telling me to use the installer.  If I do not
want to do this does that mean I cannot install Cygwin in Windows 2000?
Thanks.

--
George Hester
_





--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Trouble with inetd (start but doesn't work)

2002-04-18 Thread Andrew DeFaria

Auricom wrote:

> Hello,
>
> Here is my configuration:
>
> Win2K Server Version 5.00.2195 (no pack applied)
> Cygwin 1.3.10
>
> The problem is inetd start but I can't telnet or ftp into my computer. 
> The answer is "connection refused" when I try to connect to localhost 
> or from the net...
>
> When I use ncftp, I have this message:
>
> Administrateur@AURICOM : ncftp localhost
> NcFTP 3.1.3 (Mar 27, 2002) by Mike Gleason ([EMAIL PROTECTED]).
> Could not connect to 127.0.0.1: The socket is not connected.
> Could not open host localhost: could not connect to remote host.
>
> We can see that the socket is not connected, but I can't find a 
> solution to solve this issue.
>
> Is there a workaround ???

Try stopping the inetd server (net stop inetd) then run inetd -d from 
the command line. In another window attempt a telnet to your machine. 
Watch to see if you get any messages in the window running inetd. You 
should. If that works try your ftp command.

I suspect that inetd is not running as a service. Do you have two (yes 
two, count 'em) inetd processes showing up in the TaskMgr?

Have you added Cygwin's bin to the Windows SYSTEM Environment Variable 
PATH? Have you rebooted?




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Trouble with inetd (start but doesn't work)

2002-04-18 Thread Andrew DeFaria

Auricom wrote:

> Hello,
>
> Here is my configuration:
>
> Win2K Server Version 5.00.2195 (no pack applied)
> Cygwin 1.3.10
>
> The problem is inetd start but I can't telnet or ftp into my computer. 
> The answer is "connection refused" when I try to connect to localhost 
> or from the net...
>
> When I use ncftp, I have this message:
>
> Administrateur@AURICOM : ncftp localhost
> NcFTP 3.1.3 (Mar 27, 2002) by Mike Gleason ([EMAIL PROTECTED]).
> Could not connect to 127.0.0.1: The socket is not connected.
> Could not open host localhost: could not connect to remote host.
>
> We can see that the socket is not connected, but I can't find a 
> solution to solve this issue.
>
> Is there a workaround ???

Try stopping the inetd server (net stop inetd) then run inetd -d from 
the command line. In another window attempt a telnet to your machine. 
Watch to see if you get any messages in the window running inetd. You 
should. If that works try your ftp command.

I suspect that inetd is not running as a service. Do you have two (yes 
two, count 'em) inetd processes showing up in the TaskMgr?

Have you added Cygwin's bin to the Windows SYSTEM Environment Variable 
PATH? Have you rebooted?




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Trouble with inetd (start but doesn't work)

2002-04-18 Thread Andrew DeFaria

Auricom wrote:

> Hello,
>
> Here is my configuration:
>
> Win2K Server Version 5.00.2195 (no pack applied)
> Cygwin 1.3.10
>
> The problem is inetd start but I can't telnet or ftp into my computer. 
> The answer is "connection refused" when I try to connect to localhost 
> or from the net...
>
> When I use ncftp, I have this message:
>
> Administrateur@AURICOM : ncftp localhost
> NcFTP 3.1.3 (Mar 27, 2002) by Mike Gleason ([EMAIL PROTECTED]).
> Could not connect to 127.0.0.1: The socket is not connected.
> Could not open host localhost: could not connect to remote host.
>
> We can see that the socket is not connected, but I can't find a 
> solution to solve this issue.
>
> Is there a workaround ???

Try stopping the inetd server (net stop inetd) then run inetd -d from 
the command line. In another window attempt a telnet to your machine. 
Watch to see if you get any messages in the window running inetd. You 
should. If that works try your ftp command.

I suspect that inetd is not running as a service. Do you have two (yes 
two, count 'em) inetd processes showing up in the TaskMgr?

Have you added Cygwin's bin to the Windows SYSTEM Environment Variable 
PATH? Have you rebooted?




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Trouble with inetd (start but doesn't work)

2002-04-18 Thread Andrew DeFaria

Auricom wrote:

> Hello,
>
> Here is my configuration:
>
> Win2K Server Version 5.00.2195 (no pack applied)
> Cygwin 1.3.10
>
> The problem is inetd start but I can't telnet or ftp into my computer. 
> The answer is "connection refused" when I try to connect to localhost 
> or from the net...
>
> When I use ncftp, I have this message:
>
> Administrateur@AURICOM : ncftp localhost
> NcFTP 3.1.3 (Mar 27, 2002) by Mike Gleason ([EMAIL PROTECTED]).
> Could not connect to 127.0.0.1: The socket is not connected.
> Could not open host localhost: could not connect to remote host.
>
> We can see that the socket is not connected, but I can't find a 
> solution to solve this issue.

I suspect that inetd is not running as a service. Do you have two (yes 
two, count 'em) inetd processes showing up in the TaskMgr?

Have you added Cygwin's bin to the Windows SYSTEM Environment Variable 
PATH? Have you rebooted?




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Trouble with inetd (start but doesn't work)

2002-04-18 Thread Andrew DeFaria

Auricom wrote:

> Hello,
>
> Here is my configuration:
>
> Win2K Server Version 5.00.2195 (no pack applied)
> Cygwin 1.3.10
>
> The problem is inetd start but I can't telnet or ftp into my computer. 
> The answer is "connection refused" when I try to connect to localhost 
> or from the net...
>
> When I use ncftp, I have this message:
>
> Administrateur@AURICOM : ncftp localhost
> NcFTP 3.1.3 (Mar 27, 2002) by Mike Gleason ([EMAIL PROTECTED]).
> Could not connect to 127.0.0.1: The socket is not connected.
> Could not open host localhost: could not connect to remote host.
>
> We can see that the socket is not connected, but I can't find a 
> solution to solve this issue.
>
> Is there a workaround ???

Try stopping the inetd server (net stop inetd) then run inetd -d from 
the command line. In another window attempt a telnet to your machine. 
Watch to see if you get any messages in the window running inetd. You 
should. If that works try your ftp command.

I suspect that inetd is not running as a service. Do you have two (yes 
two, count 'em) inetd processes showing up in the TaskMgr?

Have you added Cygwin's bin to the Windows SYSTEM Environment Variable 
PATH? Have you rebooted?




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Asynchronous exceptions

2002-04-18 Thread Jindroush

Hi,

anybody has working example of catching asynchronous exceptions on
cygwin 2.95-3?

I tried:

int main()
{
 try
 {
 BadFunc();
 }
 catch(...)
 {
 printf( "Badfunc was really bad!\n" );
 }
}

void BadFunc()
{
 BYTE* p = NULL;
 *p = 0;
}

Althought I complied with -fexceptions -fasynchronous-exceptions, it
just prints out the cygwin/gcc runtime error message and produces stack
dump.

Does cygwin support that?

Jindroush ([EMAIL PROTECTED])
http://jindroush.atari.org - Home of Atari Cartridge Dumping Project.


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: A good way to debug LocalSystem services?

2002-04-18 Thread Jason Tishler

Chris,

On Thu, Apr 18, 2002 at 08:41:56PM +0100, Chris January wrote:
> And for other users:
> RUNAS /user: C:\Cygwin\Cygwin.bat

I thought of runas, but what is the password for LocalSystem?

Jason

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: command to close the bash window

2002-04-18 Thread Randall R Schulz

Hi,

Also, don't just close the window. BASH will not get a chance to do it's 
termination processing and things like history saving and / or execution of 
the commands in ~/.bash_logout, if any, won't happen.

Randall Schulz
Mountain View, CA USA


At 10:56 2002-04-18, you wrote:
>hongxun lee wrote:
>
>>Does the current package include such a command as to close the Bash window?
>
>Ah try exit! :-)


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: [ANNOUNCEMENT] New Package: Pine]

2002-04-18 Thread chris . polley

Eduardo,

In reading the cygwin-specific docs for pine
(/usr/doc/Cygwin/pine-4.44-1.README) I noticed the following instruction:

>*** How to run Pine under Cygwin 
>
> - If you plan to use filters in Pine (display and send filters) or the
>   pipe command, you need to execute the following command:
>
>   ln -s /bin/bash.exe /bin/csh.exe

Would this still be applicable if the tcsh package is installed?  Is there a
[simple|quick] explaination for this requirement?

Thanks,
Chris




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Note on cygwin

2002-04-18 Thread Ralf Habacker

Paul Leddy [paul dot harbourlight.com] send this to the kde-cygwin list
regarding cygwin and I thought, that this
seems to be good for the cygwin list. :-)
Ralf


I setup Cygwin last night. Why not just get a Linux box? Well, everybody can't
just get a Linux box: maybe they need the tools at a MS-based corporate job,
maybe there is a lack of cash, maybe a lack of know-how. So making these
incredibly useful tools available to them instantly is wonderful, I think. And
it is all free!
So what is the reason here? Compassion, giving, sharing.

What does that say to the commercial outlets and the consumers? Consumers ask
what they should really pay for. Outlets ask what is necessary to create. It
sends a message to those who are thinking of going into business building the
same tools for Windows that already exist on Unix-type systems. That message?
Already done; expand and add elsewhere. Or you have competition, so do a better
job somehow. Of course, it will take time for this message to be heard and for
it to be effective, but it is getting louder everyday.

So what is the reason here? A bit of revenge and some social efficiency.

By porting KDE, not only KDE, but hundreds of useful tools will be instantly
available. And not just the command-line ones. What kind of impression does
using KDE GUI apps make on a newbie? There is an alternative!

Think of the impression made on the new and navie this when they hear: "You can
get that C++ compiler you need for your college course setup at home [on a
existing Windows box] for free. Thanks to? Gnu. Heard of them?"

What kind of moral message does that send? Do you think some who hear this
message may look at the world as a little rosier that day than the day before? I
do.

Reason: spread the love.



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: fork() works ?? Server development questions

2002-04-18 Thread Corinna Vinschen

On Thu, Apr 18, 2002 at 09:48:13PM +0200, ioda wrote:
> I will be please, to read from Corinna Vinschen seems to be the maintainer
> of portion of Cygwin, I question about

Here it is: Don't send me private email about Cygwin questions!
Keep Cygwin stuff on list.

Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Developermailto:[EMAIL PROTECTED]
Red Hat, Inc.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




fork() works ?? Server development questions

2002-04-18 Thread ioda

Hi,

This is a re-post of my 04/06/2002 message
Many thanks to Gerrit and Phil Frisbie, Jr. for messages

But despite Gerrit seems to make it work a little better (not on local
host), it'not enough for me
Thanks to Phil for ideas but pthread are not suitable for me cause my target
project(not sample code below)
should run on systems wich were not pthread friendly !!

So big questions are still there :

Is it possible to run a server like sample code i give ?
If yes could somebody send me sample piece of code wich works ?
Is it possible to rely on fork() in cygwin ?
Is there sockets issue in the way i use it ?

I will be please, to read from Corinna Vinschen seems to be the maintainer
of portion of Cygwin, I question about

Thanks

Here start my original post

I'm in trouble porting a socket base utility from my own between mulptiple
OS.

The goal is to maintain as much as possible the same code, since this
utility
do not use advanced features (I DO NOT WANT TO CODE AN HTTP SERVER !!)

For MS plateform I hope in cygwin environment, but despite the fact it
compiles well
I do not achieve srv programm to work.

Below you will find text for four files srv.c http.c http.h and
response.html which are not the
target code, but permit to see the real problem.

This code compile under AIX whith native C compiler and other unices and run
cleanly.
This is only for test and many things were tricky, for example http HEADER
is hardcoded in the
html file !!

The problem is under cygwin environment 1.3.10 Win2k pro SP2

To test simply compile and launch srv -> gcc -o srv http.c srv.c (for AIX
cc -o srv http.c srv.c)

Then launch your favorite browser and enter those url
http://@IP_host_running_srv:12345/
just remplace "@IP_host_running_srv" by proper address or hostname for you

(Hum just thinking i only test with IE !!)

You may get a page saying hello WORLD !

Just running fine for me when running srv under AIX !

Got nothing when running on Win2k, all server trace appears in console
window but nothing in browser !!

Then I quickly set up a proxy in java based on BufferedReader and
BufferedWriter classes to
see dialog between browser and srv and surprise in  this case it'works !!!

finally here are my questions

1- : Any error in the code ?
2- : If not, what's wrong cygwin, Win2k ?
3- : Is it possible to set up this type of server using cygwin under MS
windows
 (interrested in NT and W2k, forking a  child per client !) ?
4- : What is different when using proxy ?
5- : Signal handlers doesn't not work under cygwin why ?

Thanks for any help and answers !!

8=<---srv.c--
#include 
#include 
#include 
#include 

#include "http.h"

void sigchild(int sig){
  int pid;
  pid = wait(NULL);
  signal(sig, sigchild);
}

int done = 0;
void sigterm(int sig){
  fprintf(stdout, "DEBUG : request to shutdown !");
  done = 1;
}

void handle_http(int sock){
  if (sendHttp(sock, "response.html") == -1){
perror("sendHttp");
  }
}

int main(void) {
  int listenSock;
  int dialogSock;
  int pid;
  int flag;
  struct sockaddr_in address;
  size_t length;

  signal(SIGCHLD, sigchild);
  signal(SIGTERM, sigterm);
  signal(SIGINT, sigterm);
  signal(SIGHUP, sigterm);

  if ((listenSock = socket(AF_INET, SOCK_STREAM, 0)) < 0){
perror("socket");
return(1);
  }

  memset(&address, 0, sizeof(struct sockaddr));
  address.sin_family = AF_INET;
  address.sin_addr.s_addr = htonl(INADDR_ANY);
  address.sin_port = htons(12345);

  flag = 1;
  if (setsockopt(listenSock, SOL_SOCKET, SO_REUSEADDR, &flag, sizeof(int)) <
0){
perror("setsockopt");
return(1);
  }

  if (bind(listenSock, (struct sockaddr *) &address, sizeof(address)) < 0){
perror("bind");
return(1);
  }

  length = sizeof(struct sockaddr_in);

  if (getsockname(listenSock, (struct sockaddr *) &address, &length) < 0){
perror("getsockname");
return(1);
  }

  fprintf(stdout, "DEBUG : Address IP = %s,", inet_ntoa(address.sin_addr));
  fprintf(stdout, " Port = %u \n", ntohs(address.sin_port));

  listen(listenSock, 5);

  while(!done){
fprintf(stdout, "DEBUG : Server waiting...\n");

length = sizeof(struct sockaddr_in);

dialogSock = accept(listenSock, (struct sockaddr *) &address, &length);

if (dialogSock < 0)
  continue;

pid = fork();

switch(pid){
  case 0 :
close(listenSock);
handle_http(dialogSock);
close(dialogSock);
fprintf(stdout, "DEBUG : child done\n");
return(0);
  default :
fprintf(stdout, "DEBUG : fork child %d", pid);
fprintf(stdout, " for %s:", inet_ntoa(address.sin_addr));
fprintf(stdout, "%d\n", ntohs(address.sin_port));
close(dialogSock);
  break;
}
  }
  close(listenSock);
  return(0);
}

8=<---http.c
#include 
#include 
#include 

#include "http.h"

int sendHttp(int sock, char * pathToFile){
  int fd;
  char c;
  int r

Re: A good way to debug LocalSystem services?

2002-04-18 Thread Chris January

> While trying to debug the following problem:
>
> http://sources.redhat.com/ml/cygwin/2002-04/msg00677.html
>
> I needed to run code (i.e., seteuid()) under the LocalSystem account.
> So, I used ssh to simulate su.
>
> Specifically, I changed the SYSTEM entry in /etc/passwd to be as follows:
>
> SYSTEM:*:18:18:Local
System,U-TISHLERJASON\LocalSystem,S-1-5-18:/home/system:/bin/bash
>
> Then I created /home/system and copied my ssh keys to /home/system/.ssh.
>
> After these steps, I could "su" to SYSTEM by simply executing the
> following:
>
> $ ssh system@tishlerjason
>
> Now I could run strace, gdb, etc. in the context of the LocalSystem
> account which really help me solve the above problem.  Maybe this is a
> decent way of debugging LocalSystem services in general?  Do others agree?
>
> Note that I found one anomaly so far.  With /etc/passwd as above, when
> cron runs jt's crontab it sets $HOME to /home/system instead of /home/jt.
A better way is:
AT  /interactive C:\Cygwin\Cygwin.bat
where  is 1 minute from now...
And for other users:
RUNAS /user: C:\Cygwin\Cygwin.bat

Regards
Chris



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: cygwin randomly pauses under Win2k

2002-04-18 Thread Chris January

> Anti Virus?
Yes, I'll wager that's it - the program I saw this in was lstat'ing DLL
files...

Chris



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Problems linking program

2002-04-18 Thread Larry Hall (RFK Partners, Inc)

At 02:16 PM 4/18/2002, Matt Minnis wrote:
>I am having trouble linking a program:
>
>What libraries are these found in?
>__umoddi3
>__udivdi3
>_cygwin_istext_for_stdio
>
>The errors are below:
>/usr/lib/libg.a(vfprintf.o): In function `vfprintf_r':
>/home/Habacker/src/cygwin-1.3.2-1/build/i686-pc-cygwin/newlib/libc/stdio/../../.
>./../../src/newlib/libc/stdio/vfprintf.c:774: undefined reference to `__umoddi3'
>
>/home/Habacker/src/cygwin-1.3.2-1/build/i686-pc-cygwin/newlib/libc/stdio/../../.
>./../../src/newlib/libc/stdio/vfprintf.c:775: undefined reference to `__udivdi3'
>
>/usr/lib/libg.a(stdio.o): In function `_stextmode':
>/home/Habacker/tmp/kde/cygwin-1.3.2-1/build/i686-pc-cygwin/newlib/libc/stdio/../
>../../../../src/newlib/libc/stdio/stdio.c:127: undefined reference to `_cygwin_i
>stext_for_stdio'
>make: *** [libgd.so.2.0.0] Error 1



In all seriousness, 'nm' on the available libraries will tell you this.

But I'm going to guess you won't find what you want.  It looks 
to me like you have two (other) problems:

1. You're building with against some old Cygwin DLL code

2. You're trying to build the GNU C library

You can rectify (1).  Good luck with (2).  You'll need it! ;-)




Larry Hall  [EMAIL PROTECTED]
RFK Partners, Inc.  http://www.rfk.com
838 Washington Street   (508) 893-9779 - RFK Office
Holliston, MA 01746 (508) 893-9889 - FAX


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: cygwin mentors? Was: bash and the suid bit

2002-04-18 Thread Corinna Vinschen

On Thu, Apr 18, 2002 at 08:45:24AM -0700, Richard Troy wrote:
> Not this time, Corinna. A Contribution is a contribution, regardless of
> [...]
> making the decision, "OK, I'll point. Here's where you need to go..."

Sorry, but that's not how it works.  We *want* to discuss everything
public.  This is an OSS project.  Keep it public.  You're getting
exactly as much help as a group of volunteers is willing to give.

Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Developermailto:[EMAIL PROTECTED]
Red Hat, Inc.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




A good way to debug LocalSystem services?

2002-04-18 Thread Jason Tishler

While trying to debug the following problem:

http://sources.redhat.com/ml/cygwin/2002-04/msg00677.html

I needed to run code (i.e., seteuid()) under the LocalSystem account.
So, I used ssh to simulate su.

Specifically, I changed the SYSTEM entry in /etc/passwd to be as follows:

SYSTEM:*:18:18:Local 
System,U-TISHLERJASON\LocalSystem,S-1-5-18:/home/system:/bin/bash

Then I created /home/system and copied my ssh keys to /home/system/.ssh.

After these steps, I could "su" to SYSTEM by simply executing the
following:

$ ssh system@tishlerjason

Now I could run strace, gdb, etc. in the context of the LocalSystem
account which really help me solve the above problem.  Maybe this is a
decent way of debugging LocalSystem services in general?  Do others agree?

Note that I found one anomaly so far.  With /etc/passwd as above, when
cron runs jt's crontab it sets $HOME to /home/system instead of /home/jt.

Jason

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Control-W word erase in tcsh

2002-04-18 Thread Steve Chew

>> 
>> Hello,
>>  Using the latest Cygwin under Win98 and Win2k (though this has occured 
>> in all versions of Cygwin I've used).  When I try to use a Control-W under tcsh 
>> it erases the entire line instead of just the previous word.  It happens
>
>Default setting in tcsh.
>
>> whether I'm in the console or using an xterm (rxvt).  It works properly
>> when using bash.
>> 
>>  Is there an option that I can set to make it work?  Or perhaps a
>> termcap entry that needs to be modified?
>
>Did you try `man tcsh'?
>

Sigh.  OK, sometimes I'm an idiot.  :)  I always thought that the
word-erase was set by stty, but that's not the case in tcsh.  Instead
it needs bindkey.  Thanks for the pointer.

Steve


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Problems linking program

2002-04-18 Thread Matt Minnis

I am having trouble linking a program:

What libraries are these found in?
__umoddi3
__udivdi3
_cygwin_istext_for_stdio

The errors are below:
/usr/lib/libg.a(vfprintf.o): In function `vfprintf_r':
/home/Habacker/src/cygwin-1.3.2-1/build/i686-pc-cygwin/newlib/libc/stdio/../../.
./../../src/newlib/libc/stdio/vfprintf.c:774: undefined reference to 
`__umoddi3'

/home/Habacker/src/cygwin-1.3.2-1/build/i686-pc-cygwin/newlib/libc/stdio/../../.
./../../src/newlib/libc/stdio/vfprintf.c:775: undefined reference to 
`__udivdi3'

/usr/lib/libg.a(stdio.o): In function `_stextmode':
/home/Habacker/tmp/kde/cygwin-1.3.2-1/build/i686-pc-cygwin/newlib/libc/stdio/../
../../../../src/newlib/libc/stdio/stdio.c:127: undefined reference to 
`_cygwin_i
stext_for_stdio'
make: *** [libgd.so.2.0.0] Error 1

Thanks,

Matt


"Pinky, you've left the lens cap of your mind on again." - The Brain
=
Preferred Resources  (314) 567-7600 phone
701 Emerson rd.  (314) 993-6699 fax
Suite 475  [EMAIL PROTECTED]
St. Louis, MO
63141
=


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




RE: cygwin randomly pauses under Win2k

2002-04-18 Thread Heribert Dahms

Anti Virus?

Bye, Heribert ([EMAIL PROTECTED])

> -Original Message-
> From: Chris January [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, April 18, 2002 18:30
> To:   [EMAIL PROTECTED]
> Subject:  Re: cygwin randomly pauses under Win2k
> 
> > >> Every now and again (every 15-30 minutes or so), my cygwin apps
> > >> pause for 1-2 MINUTES   I have written a simple script to capture
> > >> this behaviour:
> 
[Heribert]  [snip]
>  
> I inserted some extra syscall_printf statements and it actually stalls on
> this line... (!)
>   x = CreateFile (get_win32_name (), access, shared, &sa,
> creation_distribution,
>   file_attributes, 0);
> This is with a local drive, not a network one. I have no idea why
> CreateFile
> is taking so long.
> 
[Heribert]  [snip] 

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: command to close the bash window

2002-04-18 Thread Andrew DeFaria

hongxun lee wrote:

> Does the current package include such a command as to close the Bash 
> window?

Ah try exit! :-)




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: setup.ini : strange postgresql instructions

2002-04-18 Thread fergus


> Fergus, Is the timestamp you've given above from the setup-timestamp
> line _inside_ the setup.ini or the file datetime?

Definitely _inside_ setup.ini. That's what's so weird. Fergus


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: setup.ini : strange postgresql instructions

2002-04-18 Thread fergus

> Where did you download each setup.ini from and when?

Both from ftp://mirrors.rcn.net/ The first 1019135438 at about 1600 GMT
Thursday 20020418 and the second 1019143833 about an hour later. (Roughly.)
Perplexed by starnge reversion so selected "Cancel". Fergus


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: setup.ini : strange postgresql instructions

2002-04-18 Thread Michael A Chase

From: "Jason Tishler" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, April 18, 2002 10:10
Subject: Re: setup.ini : strange postgresql instructions


> On Thu, Apr 18, 2002 at 05:40:44PM +0100, [EMAIL PROTECTED]
wrote:
> > setup.ini stamped 1019135438 upgrades postgresql 7.2-2 to 7.2.1-1
> > setup.ini stamped 1019143833 upgrades postgresql 7.1.3-2 to 7.2-2
> > Problem with versions? For the moment I'm keeping 7.2.1-1. Thanks.
>
> I just uploaded the latest tarballs to release instead of contrib:
>
> $ scp postgresql-7.2.1-1.tar.bz2 postgresql-7.2.1-1-src.tar.bz2
[EMAIL PROTECTED]:/sourceware/ftp/anonftp/pub/cygwin/release/postgres
ql
>
> Did I do something wrong?

I don't think so.  The odd part to me is that the setup.ini with the older
datetime stamp is recommending the newer version postgresql.

Fergus, Is the timestamp you've given above from the setup-timestamp line
_inside_ the setup.ini or the file datetime?
--
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




How do I build strace.exe?

2002-04-18 Thread Mark Paulus

Hi,

I am attempting to build a debuggable version of strace.exe,
but am having some compile difficulties.  I'm hoping it's as
simple as giving some configure parms, but it looks like 
my build is getting confused trying to define or use
__uid16_t & __gid16_t.

I just updated my system to the latest system,
and grabbed the source for cygwin-1.3.10-1.

I then went into winsup/utils, and did a './configure,',
and then 'make strace.exe'

Do I need to do any additional steps to build strace.exe?

Thanks.



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: setup.ini : strange postgresql instructions

2002-04-18 Thread Jason Tishler

Chris,

On Thu, Apr 18, 2002 at 05:40:44PM +0100, [EMAIL PROTECTED] wrote:
> setup.ini stamped 1019135438 upgrades postgresql 7.2-2 to 7.2.1-1
> setup.ini stamped 1019143833 upgrades postgresql 7.1.3-2 to 7.2-2
> Problem with versions? For the moment I'm keeping 7.2.1-1. Thanks.

I just uploaded the latest tarballs to release instead of contrib:

$ scp postgresql-7.2.1-1.tar.bz2 postgresql-7.2.1-1-src.tar.bz2 
[EMAIL PROTECTED]:/sourceware/ftp/anonftp/pub/cygwin/release/postgresql

Did I do something wrong?

Thanks,
Jason

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: setup.ini : strange postgresql instructions

2002-04-18 Thread Michael A Chase

From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, April 18, 2002 09:40
Subject: setup.ini : strange postgresql instructions


> setup.ini stamped 1019135438 upgrades postgresql 7.2-2 to 7.2.1-1
> setup.ini stamped 1019143833 upgrades postgresql 7.1.3-2 to 7.2-2
> Problem with versions? For the moment I'm keeping 7.2.1-1. Thanks.

Where did you download each setup.ini from and when?
-- 
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: cygwin randomly pauses under Win2k

2002-04-18 Thread Christopher Faylor

On Thu, Apr 18, 2002 at 06:01:55PM +0200, Corinna Vinschen wrote:
>On Thu, Apr 18, 2002 at 11:52:43AM -0400, Chris Faylor wrote:
>>On Thu, Apr 18, 2002 at 04:31:56PM +0100, Chris January wrote:
Every now and again (every 15-30 minutes or so), my cygwin apps pause
for 1-2 MINUTES  I have written a simple script to capture this
behaviour:
>>>
>>>Yes, I've seen this behaviour.  It's something to do with file I/O
>>>IIRC.  100% reproducible in a small program I have.  Here's an strace
>>>demonstrating the problem:
>>
>>From the code, the only thing here that I can see which could take any
>>time is the set_security_attribute() call, which is only invoked if you
>>have CYGWIN=ntsec.
>
>And the only thing in set_security_attribute() which could take a lot
>of time is the call to LookupAccountName() which is only called if the
>/etc/passwd file doesn't contain the SID for the user *and* which can
>only take a lot of time if the machine is asking a DC.
>
>OTOH, set_security_attribute() cant have been called, otherwise it
>would have left footprints in the strace output.

Oops.  Good point.  So much for my detective work.

So the only other thing I can see is either the GetFileAttributes or the
CreateFile itself.  Not much we can do about either of those.

cgf

>>>   97 7911229 [main] base 2872 
>fhandler_base::open:(C:\cygwin\opt\kde2\lib\cygkatecore.dll, 0x11)
>>>*** big long pause ***
>>>11237820 19149049 [main] base 2872 fhandler_base::open: 0x19C = CreateFileA 
>(C:\cygwin\opt\kde2\lib\cygkatecore.dll, 0x8>000, 0x7, 0x22F764, 0x3, 0x280, 
>0)

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




setup.ini : strange postgresql instructions

2002-04-18 Thread fergus

setup.ini stamped 1019135438 upgrades postgresql 7.2-2 to 7.2.1-1
setup.ini stamped 1019143833 upgrades postgresql 7.1.3-2 to 7.2-2
Problem with versions? For the moment I'm keeping 7.2.1-1. Thanks.
Fergus


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: cygwin randomly pauses under Win2k

2002-04-18 Thread Chris January

> >> Every now and again (every 15-30 minutes or so), my cygwin apps
> >> pause for 1-2 MINUTES   I have written a simple script to capture
> >> this behaviour:
> >
> >Yes, I've seen this behaviour. It's something to do with file I/O IIRC.
100%
> >reproducible in a small program I have. Here's an strace demonstrating
the
> >problem:
>
>  From the code, the only thing here that I can see which could take any
time
> is the set_security_attribute() call, which is only invoked if you have
> CYGWIN=ntsec.

I inserted some extra syscall_printf statements and it actually stalls on
this line... (!)
  x = CreateFile (get_win32_name (), access, shared, &sa,
creation_distribution,
  file_attributes, 0);
This is with a local drive, not a network one. I have no idea why CreateFile
is taking so long.

>
> >   97 7911229 [main] base 2872 fhandler_base::open:
> >(C:\cygwin\opt\kde2\lib\cygkatecore.dll, 0x11)
> >*** big long pause ***
> >11237820 19149049 [main] base 2872 fhandler_base::open: 0x19C =
CreateFileA
> >(C:\cygwin\opt\kde2\lib\cygkatecore.dll, 0x8
> >000, 0x7, 0x22F764, 0x3, 0x280, 0)



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: cygwin randomly pauses under Win2k

2002-04-18 Thread Mark Paulus

Chris J (Not to be confused with Chris F),

How about sending along the source code for your small program,
so I can give it a wiz-bang.  So far, running strace on my system
seems to make the problem I have go away, so if you can readily 
reproduce the behaviour, I would like to try it on my system.

Thanks.


On Thu, 18 Apr 2002 16:31:56 +0100, Chris January wrote:

>> I have this wierd behaviour, and it is causing some stats that I
>> run to whack out.
>>
>> Every now and again (every 15-30 minutes or so), my cygwin apps
>> pause for 1-2 MINUTES   I have written a simple script to capture
>> this behaviour:
>
>> What's interesting is that between seconds 42 & 45,
>> time shows an elapsed time of 1:00.21, but the system clock has
>> actually elapsed 2 minutes & 50 seconds, (unless there is some
>> major hangups in the invoking of the echo and/or `date` commands).
>>
>> I am working on this machine, so I know that there are no 2-3 minute
>> pauses in user responsiveness
>>
>> Has anyone else experienced this kind of behaviour??
>
>Yes, I've seen this behaviour. It's something to do with file I/O IIRC. 100%
>reproducible in a small program I have. Here's an strace demonstrating the
>problem:
>
>   97 7911229 [main] base 2872 fhandler_base::open:
>(C:\cygwin\opt\kde2\lib\cygkatecore.dll, 0x11)
>*** big long pause ***
>11237820 19149049 [main] base 2872 fhandler_base::open: 0x19C = CreateFileA
>(C:\cygwin\opt\kde2\lib\cygkatecore.dll, 0x8
>000, 0x7, 0x22F764, 0x3, 0x280, 0)
> 1287 19150336 [main] base 2872 fhandler_base::open: filemode set to binary
>  192 19150528 [main] base 2872 fhandler_base::open: 1 = fhandler_base::open
>(C:\cygwin\opt\kde2\lib\cygkatecore.dll, 0x
>11)
>   89 19150617 [main] base 2872 fhandler_disk_file::open: 1 =
>fhandler_disk_file::open (C:\cygwin\opt\kde2\lib\cygkateco
>re.dll, 0x11)
>  136 19150753 [main] base 2872 fhandler_disk_file::fstat_helper: 1 =
>GetFileInformationByHandle (C:\cygwin\opt\kde2\lib
>\cygkatecore.dll, 412)
>  424 19151177 [main] base 2872 get_nt_attribute: file:
>C:\cygwin\opt\kde2\lib\cygkatecore.dll
>  208 19151385 [main] base 2872 read_sd: file =
>C:\cygwin\opt\kde2\lib\cygkatecore.dll
> 1385 19152770 [main] base 2872 read_sd: file =
>C:\cygwin\opt\kde2\lib\cygkatecore.dll: len=128
>
>Regards
>Chris
>
>
>
>--
>Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
>Bug reporting: http://cygwin.com/bugs.html
>Documentation: http://cygwin.com/docs.html
>FAQ:   http://cygwin.com/faq/
>




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: cygwin randomly pauses under Win2k

2002-04-18 Thread Corinna Vinschen

On Thu, Apr 18, 2002 at 11:52:43AM -0400, Chris Faylor wrote:
> On Thu, Apr 18, 2002 at 04:31:56PM +0100, Chris January wrote:
> >> Every now and again (every 15-30 minutes or so), my cygwin apps
> >> pause for 1-2 MINUTES   I have written a simple script to capture
> >> this behaviour:
> >
> >Yes, I've seen this behaviour. It's something to do with file I/O IIRC. 100%
> >reproducible in a small program I have. Here's an strace demonstrating the
> >problem:
> 
>  From the code, the only thing here that I can see which could take any time
> is the set_security_attribute() call, which is only invoked if you have
> CYGWIN=ntsec.

And the only thing in set_security_attribute() which could take a lot
of time is the call to LookupAccountName() which is only called if
the /etc/passwd file doesn't contain the SID for the user *and*
which can only take a lot of time if the machine is asking a DC.

OTOH, set_security_attribute() cant have been called, otherwise
it would have left footprints in the strace output.

> >   97 7911229 [main] base 2872 fhandler_base::open:
> >(C:\cygwin\opt\kde2\lib\cygkatecore.dll, 0x11)
> >*** big long pause ***
> >11237820 19149049 [main] base 2872 fhandler_base::open: 0x19C = CreateFileA
> >(C:\cygwin\opt\kde2\lib\cygkatecore.dll, 0x8
> >000, 0x7, 0x22F764, 0x3, 0x280, 0)
> 
> cgf

Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Developermailto:[EMAIL PROTECTED]
Red Hat, Inc.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Fw: command to close the bash window

2002-04-18 Thread hongxun lee

Thanks Larry...it satisfies my needs well...))

- Original Message -
From: "Larry Hall (RFK Partners, Inc)" <[EMAIL PROTECTED]>
To: "hongxun lee" <[EMAIL PROTECTED]>
Sent: Thursday, April 18, 2002 11:48 AM
Subject: Re: command to close the bash window


> At 11:42 AM 4/18/2002, you wrote:
> >Does the current package include such a command as to close the Bash
window?
>
>
> What about "exit"?
>
> OK, I get the feeling that this isn't what you wanted to know but given
the
> generic context of the question, it's the best I can do.  Want to try
again
> or is this really what you wanted to know?
>
>
>
> Larry Hall  [EMAIL PROTECTED]
> RFK Partners, Inc.  http://www.rfk.com
> 838 Washington Street   (508) 893-9779 - RFK Office
> Holliston, MA 01746 (508) 893-9889 - FAX
>
>


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: cygwin randomly pauses under Win2k

2002-04-18 Thread Christopher Faylor

On Thu, Apr 18, 2002 at 04:31:56PM +0100, Chris January wrote:
>> Every now and again (every 15-30 minutes or so), my cygwin apps
>> pause for 1-2 MINUTES   I have written a simple script to capture
>> this behaviour:
>
>Yes, I've seen this behaviour. It's something to do with file I/O IIRC. 100%
>reproducible in a small program I have. Here's an strace demonstrating the
>problem:

 From the code, the only thing here that I can see which could take any time
is the set_security_attribute() call, which is only invoked if you have
CYGWIN=ntsec.

>   97 7911229 [main] base 2872 fhandler_base::open:
>(C:\cygwin\opt\kde2\lib\cygkatecore.dll, 0x11)
>*** big long pause ***
>11237820 19149049 [main] base 2872 fhandler_base::open: 0x19C = CreateFileA
>(C:\cygwin\opt\kde2\lib\cygkatecore.dll, 0x8
>000, 0x7, 0x22F764, 0x3, 0x280, 0)

cgf

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: cygwin mentors? Was: bash and the suid bit

2002-04-18 Thread Richard Troy


> > >   It requires a person with
> > > a lot of time, actually...
> >
> >  And, I have been wondering how I might
> > contribute too, being as over- worked and as busy as I am.
>
> Contribution is something you're doing voluntarily and just
> as far as you're able to.  We all have daytime jobs which
> take more or less time.  If there's energy left a few minutes
> a day... go ahead and contribute.

Not this time, Corinna. A Contribution is a contribution, regardless of
the circumstances of its creation, I submit. I am, personally, interested
in helping, however, if it weren't for the confluence of needs, I would
not even be able to entertain the concept of helping at this time.

You may operate under the assumption that it's left-over minutes in the
day that are being applied, and you're probably right for most everyone
else.  However, that's not what I'm proposing. If I attempt this, it will
be "during my work day", which, at the present time, comprises about 5AM
to midnight every day, including weekends and most holidays - aren't
startup companies fun? -wink- ...I need this other code to run on a
Windows Box (NT/2k and later), and it's a high priority. If the best way
to get it there is to help implement suid in cygwin, then I can justify it
and both cygwin and my work benefit. Since I think my problem would be
solved if only cygwin honored the suid bit, then it may make sense.
Otherwise, I'm off to create a wholly different solution that will
probably not make use of cygwin at all, and in that case, cygwin won't
benefit.

That said, presuming I give it a go, while this is a very high priority,
it doesn't mean I can spend 100% of my time on it until it's done, though
I may spend 8 hours a day on it, perhaps. ...Anyway, this is why I'm
asking for a mentor: Help keep me focused on this problem and not get lost
on dead-ends. Remember I indicated I have no experience programming in
this environment, and it's clear enough I'm not yet fully informed of the
systems internals issues that NT+ pose. Yet some of you are. If you can
point me in the right direction, this could work. Or, you could let me
flail around, spend countless hours reading email archives only to not
find direction, spend countless more reading up on MS topics that don't
really have anything to do with what I'm trying to do - but I don't know
any better - and the project suffers and with it my work. And we both
loose - cygwin looses a potentially very helpful contribution and I loose
potentially very important hours.

Resolving this connundrum is exactly what mentorship is all about: Focus
the newcomer on the important things. If you are - someone is - up for it,
so am I. Keep in mind, I'm offering that huge chunk of that time you said
was required in exchange for only a little time from an experienced member
of the community. I don't understand why you wouldn't encourage such a
"trade."  However, I'm experienced enough to know that you're right when
you say solving the SUID problem will take "a lot of time." Without
someone to draw upon for guidance, I'm not sure I'm ready for the risk of
this tar-baby (time sink). Yes, it's possible to use this e-list for that
purpose, but experience says that's not nearly as effective as someone
making the decision, "OK, I'll point. Here's where you need to go..."

Respectfully yours,
Richard

-- 
Richard Troy, Chief Scientist
Science Tools Corporation
[EMAIL PROTECTED], 510-567-9957, http://ScienceTools.com/



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




command to close the bash window

2002-04-18 Thread hongxun lee

Does the current package include such a command as to close the Bash window?
Thanks


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: cygwin randomly pauses under Win2k

2002-04-18 Thread Chris January

> I have this wierd behaviour, and it is causing some stats that I
> run to whack out.
>
> Every now and again (every 15-30 minutes or so), my cygwin apps
> pause for 1-2 MINUTES   I have written a simple script to capture
> this behaviour:

> What's interesting is that between seconds 42 & 45,
> time shows an elapsed time of 1:00.21, but the system clock has
> actually elapsed 2 minutes & 50 seconds, (unless there is some
> major hangups in the invoking of the echo and/or `date` commands).
>
> I am working on this machine, so I know that there are no 2-3 minute
> pauses in user responsiveness
>
> Has anyone else experienced this kind of behaviour??

Yes, I've seen this behaviour. It's something to do with file I/O IIRC. 100%
reproducible in a small program I have. Here's an strace demonstrating the
problem:

   97 7911229 [main] base 2872 fhandler_base::open:
(C:\cygwin\opt\kde2\lib\cygkatecore.dll, 0x11)
*** big long pause ***
11237820 19149049 [main] base 2872 fhandler_base::open: 0x19C = CreateFileA
(C:\cygwin\opt\kde2\lib\cygkatecore.dll, 0x8
000, 0x7, 0x22F764, 0x3, 0x280, 0)
 1287 19150336 [main] base 2872 fhandler_base::open: filemode set to binary
  192 19150528 [main] base 2872 fhandler_base::open: 1 = fhandler_base::open
(C:\cygwin\opt\kde2\lib\cygkatecore.dll, 0x
11)
   89 19150617 [main] base 2872 fhandler_disk_file::open: 1 =
fhandler_disk_file::open (C:\cygwin\opt\kde2\lib\cygkateco
re.dll, 0x11)
  136 19150753 [main] base 2872 fhandler_disk_file::fstat_helper: 1 =
GetFileInformationByHandle (C:\cygwin\opt\kde2\lib
\cygkatecore.dll, 412)
  424 19151177 [main] base 2872 get_nt_attribute: file:
C:\cygwin\opt\kde2\lib\cygkatecore.dll
  208 19151385 [main] base 2872 read_sd: file =
C:\cygwin\opt\kde2\lib\cygkatecore.dll
 1385 19152770 [main] base 2872 read_sd: file =
C:\cygwin\opt\kde2\lib\cygkatecore.dll: len=128

Regards
Chris



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




RE: cygwin mentors? Was: bash and the suid bit

2002-04-18 Thread Justin MacCarthy


Hi Richard, a short answer pretty busy, hopes its enough to get you
started...

> Tell me about it, Justin!
> No, Nobody mentioned that!
> How does it work? Is it part of the OS or an add-on?

It's a Win2000 native service , look in services
Description : "Enables starting processes under alternate credentials"

Nearest thing to  sudo (ala Linux) I know of

> Also, can it be ported/made to work on NT?

Might need to use the  CreateProcessWithLogonW
http://msdn.microsoft.com/library/en-us/dnwxp/html/appsec.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/pro
thred_2gl3.asp


> If it only works on W2000, it might not be good enough for my needs...
>

Only works on Win2000 AFAIK , although might in XP etc.

http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;Q294676&;

http://www.microsoft.com/windows2000/en/server/help/windows_security_runas.h
tm

Actually one of those articles mentions XP so.

> Thanks for your reply,
> Richard
>

> --
> Richard Troy, Chief Scientist
> Science Tools Corporation
> [EMAIL PROTECTED], 510-567-9957, http://ScienceTools.com/
>
> On Thu, 18 Apr 2002, Justin MacCarthy wrote:
>
> > Date: Thu, 18 Apr 2002 15:28:25 +0100
> > From: Justin MacCarthy <[EMAIL PROTECTED]>
> > To: Richard Troy <[EMAIL PROTECTED]>
> > Subject: RE: cygwin mentors?  Was: bash and the suid bit
> >
> > I haven't followed this tread, but I had a quick look , did
> anyone mention
> > the RunAs service in WIn2000?
> >
> > Might solve your problem ???
> >
> > Justin
> >
>
>
>


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: cygwin mentors? Was: bash and the suid bit

2002-04-18 Thread Corinna Vinschen

On Thu, Apr 18, 2002 at 07:19:09AM -0700, Richard Troy wrote:
> >   It requires a person with
> > a lot of time, actually...
> 
>  And, I have been wondering how I might
> contribute too, being as over- worked and as busy as I am.

Contribution is something you're doing voluntarily and just
as far as you're able to.  We all have daytime jobs which
take more or less time.  If there's energy left a few minutes
a day... go ahead and contribute.

> Anyone want to be a mentor?

Why is it so difficult to get into Cygwin?  Take the sources
try to compile and then change what you think should be changed.
Small changes first, big changes later.  And don't be offended if
a change is rejected.  That's how it worked for me back in 1998
and that's how it works today.

Oh, and take a look onto http://cygwin.com/contrib.html.

Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Developermailto:[EMAIL PROTECTED]
Red Hat, Inc.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: ASCII ftp transfer contains ^M

2002-04-18 Thread Larry Hall (RFK Partners, Inc)

At 03:54 AM 4/18/2002, lau bella wrote:
>Hi all,
>
>I installed Cygwin 1.3.10 in w2k advanced server
>(SP2).
>
>I create a DOS text file A with notepad in PC. The
>size of file A displayed as 80 bytes in DOS prompt. I
>used ASCII mode to transfer file A to the w2k advanced
>server (using Cygwin ftp server). The size of file A
>displayed as 80 bytes in Cygwin. When I use Cygwin
>command 'dos2unix' to convert file A. The file size
>changed to 75 byte.
>
>File A may contain ^M characters. I want Cygwin
>convert file A from DOS format to UNIX format
>automatically after ftp. How can i do that, any
>setting needed ?



For any possible settings needed, I'll direct you to the FTP
man page.  If there's a way to do it, it will be listed there.
In general, this is not a Cygwin issue.  It's a general FTP 
issue.  You would have the same result if you used a native 
Windows FTP server.  Cygwin's FTP server will create native 
text files just like a Windows FTP server will when text mode
transfer is selected. 



Larry Hall  [EMAIL PROTECTED]
RFK Partners, Inc.  http://www.rfk.com
838 Washington Street   (508) 893-9779 - RFK Office
Holliston, MA 01746 (508) 893-9889 - FAX


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




cygwin mentors? Was: bash and the suid bit

2002-04-18 Thread Richard Troy



> First of all, it's not bash but the OS (here Cygwin) which would
> have to care for the suid bit.

-smile-

> Second, the suid bit is available with ntsec on NTFS file systems
> but for now it's *only* available as a flag.  It has no effect!

Yes! I have learned this! And I am sad because of it.

> The implementation of suid under Win32 requires a running daemon
> with special permissions (running under SYSTEM account, that is)
> which can start a process under a different user account on behalf
> of the calling process.  The daemon already exists but the suid
> functionality isn't implemented yet.  It requires a person with
> a lot of time, actually...

Yes, I was afraid of that. -frown-

Perhaps this seems a silly place to say so, but I'm very impressed with
the work I've seen in CYGWIN, and in the open community and GNU in
general. In researching this SUID problem, I spent six or eight hours
yesterday reading all the related posts from the archive, and I noticed
how there's a lot of really good work - the internals discussions have
been well written and there are a few of you, like you, Corinna, who are
outstanding contributors... And, I have been wondering how I might
contribute too, being as over- worked and as busy as I am. However, I
_really_ need this - or some solution - working in this environment, so it
seems we have a case of converging needs. I think It makes more sense for
me to help out with suid than it does for me to write a one-off.

... After thinking it over for a bit...

I'm willing to give it a go if someone can mentor me along. My
apprenticeship resume: I started hacking in '77 at the tender age of 14,
so by now I've got a lot of experience. I once wrote a complete real-time,
multi-tasking operating system by myself which is in use today controlling
pipelines and oil refineries, and I used to be one of the top VAX/VMS
internals people at DEC, so this internals experience must be of some use
here, especially since NT/W2k is based on VMS. If someone were to work
with me, point me at the juicy stuff so I don't have to hunt so much, I
can probably commit to this project. Otherwise, I'm concerned it'll take
me too long to ramp up.

Anyone want to be a mentor?

Regards,
Richard

-- 
Richard Troy, Chief Scientist
Science Tools Corporation
[EMAIL PROTECTED], 510-567-9957, http://ScienceTools.com/




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: strange source packaging?

2002-04-18 Thread Christopher Faylor

On Thu, Apr 18, 2002 at 01:34:45PM +0200, Schaible, Jorg wrote:
>
>>  package-ver.tar.[bg]z[2*]   <-- The pristine source
>
>Beeing picky:
>package-ver.tar.(bz2|gz)

Being picky, what is this doing here?  Why do people insist on
redirecting discussions from cygwin-apps to cygwin?

cgf

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




[ANNOUNCEMENT] Updated: postgresql-7.2.1-1

2002-04-18 Thread Jason Tishler

New News:
=== 
I have updated the version of PostgreSQL to 7.2.1-1.  The tarballs should
be available on a Cygwin mirror near you shortly.

PostgreSQL 7.2.1 is a critical bug fix release that corrects the
following problem:

sequence counters will go backwards after a crash

See the following for more details:

http://www.us.postgresql.org/news.html

Old News:
=== 
PostgreSQL is an open-source, Object-Relational DBMS.  If interested,
see the PostgreSQL web site for more details:

http://www.postgresql.org/

Please read the README file:

/usr/doc/Cygwin/postgresql-7.2.1.README

since it covers requirements, installation, known issues, etc.

To update your installation, click on the "Install Cygwin now" link on
the http://cygwin.com/ web page.  This downloads setup.exe to your
system.  Then, run setup and answer all of the questions.

Note that we have recently stopped downloads from sources.redhat.com
(aka cygwin.com) due to bandwidth limitations.  This means that you will
need to find a mirror which has this update.

In the US,
ftp://mirrors.rcn.net/mirrors/sources.redhat.com/cygwin/
is a reliable high bandwidth connection.

In Germany,
ftp://ftp.uni-erlangen.de/pub/pc/gnuwin32/cygwin/mirrors/cygnus/
is usually pretty good.

In the UK,
http://programming.ccp14.ac.uk/ftp-mirror/programming/cygwin/pub/cygwin/
is usually up-to-date within 48 hours.

If one of the above doesn't have the latest version of this package
then you can either wait for the site to be updated or find another
mirror.

The setup.exe program will figure out what needs to be updated on your
system and will install newer packages automatically.

If you have questions or comments, please send them to the Cygwin
mailing list at: [EMAIL PROTECTED] .  I would appreciate if you would
use this mailing list rather than emailing me directly.  This includes
ideas and comments about the setup utility or Cygwin in general.

If you want to make a point or ask a question, the Cygwin mailing list
is the appropriate place.

  *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

If you want to unsubscribe from the cygwin-announce mailing list, look
at the "List-Unsubscribe: " tag in the email header of this message.
Send email to the address specified there.  It will be in the format:

[EMAIL PROTECTED]

Jason


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




RE: pthread_cond_wait does not relock mutex on release

2002-04-18 Thread Gerald S. Williams

It's interesting that your system behaves so differently. (I
believe signals are supposed to interrupt condition variable
waits--perhaps you're system is being flooded by them?)

There are a few things you could try, including:

o Disabling signals in the created threads. To do this, you
  have to disable them in the parent, create the threads,
  then reenable them. It's generally worth it.

o Using a semaphore (you still have to check for a spurious
  wakeup due to a caught signal).


Here are some code snippets you might find helpful:


This creates threads, disabling signals (extracted from
Python's POSIX threads module):

sigset_t oldmask, newmask;
sigfillset(&newmask);
pthread_sigmask(SIG_BLOCK, &newmask, &oldmask);
pthread_create(...);
pthread_sigmask(SIG_SETMASK, &oldmask, NULL);


These snippets should let you use semaphores to signal
between threads:


/*
 * As of February 2002, Cygwin thread implementations mistakenly report error
 * codes in the return value of the sem_ calls (like the pthread_ functions).
 * Correct implementations return -1 and put the code in errno. This supports
 * either.
 */
static int
fix_status(int status)
{
return (status == -1) ? errno : status;
}

...


/* VARIABLES USED IN ALL SNIPPETS: */
sem_t *sem;
int status;


/* CREATE A SEMAPHORE */
sem = (sem_t *)malloc(sizeof(sem_t));
if (sem) {
status = sem_init(sem,0,0); /* start "acquired" */
if (status != 0) {
free((void *)sem);
sem = NULL;
}
}
if (!sem) REPORT_ERROR();


/* DESTROY THE SEMAPHORE */
if (sem) {
status = sem_destroy(sem);
if (status != 0) REPORT_ERROR();
free(sem);
}


/* WAIT FOR THE SIGNAL */
do {
status = fix_status(sem_wait(sem));
} while (status == EINTR); /* Retry if interrupted by a signal */
if (status != 0) REPORT_ERROR();


/* SIGNAL THE SEMAPHORE */
status = sem_post(sem);
if (status != 0) REPORT_ERROR();


I think the bug requiring the "fix_status" function has been
fixed, but you might find it easier to understand this way.
The "normal" way to wait for a semaphore is:
do {
status = sem_wait(sem);
} while ((status == -1) && (errno == EINTR));


With semaphores you have to be careful to match the number of
sem_wait() and sem_post() calls (extra sem_post() calls would
cause future sem_wait()'s not to wait).


-Jerry

-O Gerald S. Williams, 55A-134A-E   : mailto:[EMAIL PROTECTED] O-
-O AGERE SYSTEMS, 6755 SNOWDRIFT RD : office:610-712-8661  O-
-O ALLENTOWN, PA, USA 18106-9353: mobile:908-672-7592  O-

> Robert and Gerald:
>
>  Both quite right.  Although adding the SAFE_PRINTF made no
> difference in the
> output, checking a condition value in a loop made all the difference.  
> Putting a printf in the loop revealed to my surprise that "spurious wakeups"
> were occurring thousands of times per second.  I had naively assumed that a
> condition would stay set until signalled.  Now I'm led to wonder if a
> condition variable is any performance improvement over a simple loop and
> short sleep.  Any thoughts?
>
>  Thanks very much for your time and effort.  It was a great help.
>
> -- Michael


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




strange dup error

2002-04-18 Thread Chris January

Sometimes when I use Cygwin.bat to start bash and I have another instance of
bash running, I get this error appear at the top of the console:

   3996 [main] bash 2436 fhandler_base::dup: dup(/dev/tty) failed, handle B,
Win32 error 87
readline: warning: rl_prep_terminal: cannot get terminal settings?]0;~
?[32mchris@ADVENT02 ?[33m~?[0m

Win32 error 87 = ERROR_INVALID_PARAMETER
The control characters in the bash prompt are visible on the terminal - the
colour does not change.

I've searched the mailing list archives, but it doesn't seem to have been
reported before. I've been trying to find a way to replicate it, but at the
moment it seems to be random.

Regards
Chris



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




RE: Trouble with inetd (start but doesn't work)

2002-04-18 Thread Auricom

hello Pavel,

Ftp line and telnet line are not commented !
That's the problem ;-)

I'm working on this problem for 2 days now.
I have done everything that was explain in the readme files provided with
cygwin, I watch all HowTo I can find over internet and it doesn't work...

It really seems that inetd don't use any socket, so the question is how
inetd can run like this ??

Thank you for your help
[EMAIL PROTECTED]


-Message d'origine-
De : Pavel Tsekov [mailto:[EMAIL PROTECTED]]
Envoye : jeudi 18 avril 2002 13:01
A : Auricom
Cc : [EMAIL PROTECTED]
Objet : Re: Trouble with inetd (start but doesn't work)


Hello Auricom,

Thursday, April 18, 2002, 8:40:14 PM, you wrote:

A> The problem is inetd start but I can't telnet or ftp into my computer.
A> The answer is "connection refused" when I try to connect to localhost
A> or from the net...


Do you have the ftp line in /etc/inetd.conf commented ? Is so
remove the comment.


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




RE: Trouble with inetd (start but doesn't work)

2002-04-18 Thread Auricom

hello Pavel,

Ftp line and telnet line are not commented !
That's the problem ;-)

I'm working on this problem for 2 days now.
I have done everything that was explain in the readme files provided with
cygwin, I watch all HowTo I can find over internet and it doesn't work...

It really seems that inetd don't use any socket, so the question is how
inetd can run like this ??

Thank you for your help
[EMAIL PROTECTED]


-Message d'origine-
De : Pavel Tsekov [mailto:[EMAIL PROTECTED]]
Envoye : jeudi 18 avril 2002 13:01
A : Auricom
Cc : [EMAIL PROTECTED]
Objet : Re: Trouble with inetd (start but doesn't work)


Hello Auricom,

Thursday, April 18, 2002, 8:40:14 PM, you wrote:

A> The problem is inetd start but I can't telnet or ftp into my computer.
A> The answer is "connection refused" when I try to connect to localhost
A> or from the net...


Do you have the ftp line in /etc/inetd.conf commented ? Is so
remove the comment.


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




RE: strange source packaging?

2002-04-18 Thread Schaible, Jorg


>  package-ver.tar.[bg]z[2*]   <-- The pristine source

Beeing picky:
package-ver.tar.(bz2|gz)

Or is anyone out there who has a packer/unpacker for .gz2  ??

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Alan Dobkin multi-mail

2002-04-18 Thread Matthew O. Persico

Is it just me or is everyone on the list repeatedly receivng multiple copies of Alan's 
post dated 4/2/2002?
--
Donna & Matthew



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Trouble with inetd (start but doesn't work)

2002-04-18 Thread Pavel Tsekov

Hello Auricom,

Thursday, April 18, 2002, 8:40:14 PM, you wrote:

A> The problem is inetd start but I can't telnet or ftp into my computer.
A> The answer is "connection refused" when I try to connect to localhost
A> or from the net...


Do you have the ftp line in /etc/inetd.conf commented ? Is so
remove the comment.


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: setup with empty proxy password

2002-04-18 Thread ljubomir . milanovic


Hi,

> Your question implies that you're having some kind of troubles using
> setup.exe but you don't say whats wrong. Would you share the details
> with us so we can answer your question.

Sorry for beeing unprecise. My internet acsess setup is solved by an
"automatic configuration script" proxy server, with an user name, but without
password (empty password). If I start cygwin setup.exe, and choose "Use IE5 Settings",
the prompt for "Proxy authorisation" pops up. The problem is: without
specifying some password, the "OK" button stays inactive. And, of course,
only correct password is empty one :(

Bye,
Ljubo


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Trouble with inetd (start but doesn't work)

2002-04-18 Thread Auricom

Hello,

Here is my configuration:

Win2K Server Version 5.00.2195 (no pack applied)
Cygwin 1.3.10

The problem is inetd start but I can't telnet or ftp into my computer.
The answer is "connection refused" when I try to connect to localhost
or from the net...

When I use ncftp, I have this message:

Administrateur@AURICOM : ncftp localhost
NcFTP 3.1.3 (Mar 27, 2002) by Mike Gleason ([EMAIL PROTECTED]).
Could not connect to 127.0.0.1: The socket is not connected.
Could not open host localhost: could not connect to remote host.

We can see that the socket is not connected, but I can't find a solution
to solve this issue.
 
Is there a workaround ???

Thanks for help...
[EMAIL PROTECTED]


---
Ce mel a été envoyé avec Meloo http://www.meloo.com


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: setup with empty proxy password

2002-04-18 Thread Pavel Tsekov

Hello ljubomir,

Thursday, April 18, 2002, 10:34:29 AM, you wrote:

lmpc> Just a simple question: How to use setup (IE settings) when proxy password is 
empty?

Your question implies that you're having some kind of troubles using
setup.exe but you don't say whats wrong. Would you share the details
with us so we can answer your question.


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Control-W word erase on tcsh command line

2002-04-18 Thread Corinna Vinschen

On Thu, Apr 18, 2002 at 04:16:01AM -0400, Steve Chew wrote:
> 
> Hello,
>   Using the latest Cygwin under Win98 and Win2k (though this has occured 
> in all versions of Cygwin I've used).  When I try to use a Control-W under tcsh 
> it erases the entire line instead of just the previous word.  It happens

Default setting in tcsh.

> whether I'm in the console or using an xterm (rxvt).  It works properly
> when using bash.
> 
>   Is there an option that I can set to make it work?  Or perhaps a
> termcap entry that needs to be modified?

Did you try `man tcsh'?

Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Developermailto:[EMAIL PROTECTED]
Red Hat, Inc.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: will bash honor the suid bit or not?

2002-04-18 Thread Corinna Vinschen

On Wed, Apr 17, 2002 at 06:56:08PM -0700, Richard Troy wrote:
> [...]

First of all, it's not bash but the OS (here Cygwin) which would
have to care for the suid bit.

Second, the suid bit is available with ntsec on NTFS file systems
but for now it's *only* available as a flag.  It has no effect!
The implementation of suid under Win32 requires a running daemon
with special permissions (running under SYSTEM account, that is)
which can start a process under a different user account on behalf
of the calling process.  The daemon already exists but the suid
functionality isn't implemented yet.  It requires a person with
a lot of time, actually...

Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Developermailto:[EMAIL PROTECTED]
Red Hat, Inc.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: sshd/cron seteuid() problem in latest CVS

2002-04-18 Thread Corinna Vinschen

On Wed, Apr 17, 2002 at 11:25:53AM -0400, Jason Tishler wrote:
> After some more digging, I believe that I have found the root cause to
> the above problem.  The new way, via NetGetDCName(), causes two extra
> backslashes to be prepended to the PDC name as demonstrated by the
> attached test program:
> 
> NetServerEnum PDC = PALO-ALTO-PDC
> NetGetDCName PDC = \\PALO-ALTO-PDC
> 
> This causes the NetUserGetGroups() call in get_user_groups() to SEGV
> (at least under gdb) and hence, ultimately create_token() fails.

Ok, that explains it.

> My WAG regarding domain vs. workgroup was correct because the workgroup
> path through this code does not cause extra backslashes to be prepended.
> 
> I will submit a patch to cygwin-patches to correct this problem.

Thanks,
Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Developermailto:[EMAIL PROTECTED]
Red Hat, Inc.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




setup with empty proxy password

2002-04-18 Thread ljubomir . milanovic

Hi,

Just a simple question: How to use setup (IE settings) when proxy password is empty?

Bye,
Ljubo


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: [ANNOUNCEMENT] New Package: enscript-1.6.3-2

2002-04-18 Thread Dr. Volker Zell

> "Gerrit" == Gerrit P Haase <[EMAIL PROTECTED]> writes:

Gerrit> enscript-1.6.3-2 has been uploaded to the Cygwin net distribution.
Gerrit> `Enscript' converts ASCII files to PostScript.

Gerrit> This is a bugfix release:

Gerrit> Now a default enscript.cfg file is included in /etc as 
Gerrit> /etc/enscript.cfg.default .
Gerrit> Please copy/move it to /etc/enscript.cfg and modify it to
Gerrit> your taste.

Hi

/etc/postinstall/enscript.sh.done

has the following lines:

if [ ! -e /etc/enscript.cfg ] ; then
cp /etc/enscript.cfg.default /etc/enscript/cfg
fi

Shouldn't that be:

if [ ! -e /etc/enscript.cfg ] ; then
cp /etc/enscript.cfg.default /etc/enscript.cfg
fi   ^


Ciao
  Volker


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Control-W word erase on tcsh command line

2002-04-18 Thread Steve Chew


Hello,
Using the latest Cygwin under Win98 and Win2k (though this has occured 
in all versions of Cygwin I've used).  When I try to use a Control-W under tcsh 
it erases the entire line instead of just the previous word.  It happens
whether I'm in the console or using an xterm (rxvt).  It works properly
when using bash.
I'm using the tcsh that came with the Cygwin update (6.11.00).  Here
is the version info:
version tcsh 6.11.00 (Astron) 2001-09-02 (i386-intel-posix) 
options 8b,dl,al,rh,color

Is there an option that I can set to make it work?  Or perhaps a
termcap entry that needs to be modified?
Thanks for any info.

Steve


-- 
Steve Chew - [EMAIL PROTECTED] - http://www.interzone.com
"Men go abroad to wonder at the height of mountains, at the
 huge waves of the sea, at the long courses of the rivers, at the
 vast compass of the ocean, at the circular motion of the stars;
 and they pass by themselves without wondering."
 -- Saint Augustine

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




ASCII ftp transfer contains ^M

2002-04-18 Thread lau bella

Hi all,

I installed Cygwin 1.3.10 in w2k advanced server
(SP2).

I create a DOS text file A with notepad in PC. The
size of file A displayed as 80 bytes in DOS prompt. I
used ASCII mode to transfer file A to the w2k advanced
server (using Cygwin ftp server). The size of file A
displayed as 80 bytes in Cygwin. When I use Cygwin
command 'dos2unix' to convert file A. The file size
changed to 75 byte.

File A may contain ^M characters. I want Cygwin
convert file A from DOS format to UNIX format
automatically after ftp. How can i do that, any
setting needed ?

thanks






___
Do You Yahoo!?
Get your free @yahoo.com.hk address at http://mail.english.yahoo.com.hk

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Briliant Stuff

2002-04-18 Thread Patrick Lynch

The installer is best ever.. better than attempts made by microsoft( 
Offic2000).

I used the reinstall feature( Brilliant!) and it knew not to create the 
desktop short cut.

An installer that behaves the way a unix hacker would if doing it manually!

Also, cygwin-xfree86 is the only FREE way to get X11R6 on Win32 desktop.
I can use the monitor on my Linux box elsewhere.

Patrick.



_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/