Randomly Cursor Jumps To Home

2005-01-30 Thread Ryan Wagoner
When typing in xwin the cursor will jump to the beginning of the line at
random times, like pressing the home key would accomplish. I have the
latest version installed on both my p4 hyperthreaded desktop and p2
laptop. The desktop machine is the only one having this problem. There
is no way to predict when this will happen. Just at random times I will
be typing in a command and the cursor will jump to the beginning of the
line and start overwriting what I had typed previously. I have tried
using twm as the window manager and get the same result. Any help would
be appreciated.

Thanks,
Ryan


Re: Randomly Cursor Jumps To Home

2005-01-30 Thread Igor Furlan
I had similar problem with my mouse.  At the end I've
figured it out, was just the mouse.  After I've
replace it with another one, the problem was gone.

--- Ryan Wagoner [EMAIL PROTECTED] wrote:

 When typing in xwin the cursor will jump to the
 beginning of the line at
 random times, like pressing the home key would
 accomplish. I have the
 latest version installed on both my p4 hyperthreaded
 desktop and p2
 laptop. The desktop machine is the only one having
 this problem. There
 is no way to predict when this will happen. Just at
 random times I will
 be typing in a command and the cursor will jump to
 the beginning of the
 line and start overwriting what I had typed
 previously. I have tried
 using twm as the window manager and get the same
 result. Any help would
 be appreciated.
 
 Thanks,
 Ryan
 



Re: pthreads leaks handles and threads when threads use sockets

2005-01-30 Thread Reini Urban
Mark Pizzolato schrieb:
Reini Urban wrote:
Mark Pizzolato schrieb:
 I've been using clamav's clamd under cygwin and noticed that over time
 the handle count as viewed with TaskManager seems to grow to arbitrary
 values. I used clamd's option IdleTimeout set to 600 seconds which
 dramatically reduced the growth rate of the Handle Count. Of course
 clamd has many things going on that could contribute to handle leakags,
 so I tried to write a simple program to demonstrate the problem.
Thanks a lot! Maybe we should restart the two daemons daily or weekly?
I will change the default IdleTimeout to 600 secs with the upcoming
clamav-0.81 release. Which fixes the freshclam proxy problem and some
OLE issues.
Merely setting IdleTimeout to 600 is currently insufficient due to a bug 
which only uses the IdleTimeout parameter for the Initial value used.  
After the AV Database is reloaded, the idle timeout is hardset to 30 
seconds.  The attached patch (to 0.80 or 0.81) fixes this issue.  This 
patch has been submitted on the clamav-devel list.
Yes, I saw it and already patched my 0.81.
But I still have to find some time reproduce your problem.
The right choice for the IdleTimeout is a value which is larger than the 
largest gap between messages that arrive on your system.  This is 
somewhat complicated by multiple connections arriving concurrently which 
is handled by MaxThreads.  MaxThreads has a default value of 10.  This 
would be fine for most systems, however libclamav uses tmpfile() 
internally which is NOT threadsafe (using newlib's tmpfile()) for any 
system which returns the same value for getpid() for each thread in a 
process (i.e. it works fine on Linux since getpid() on Linux returns a 
unique value for all threads on the system).  I've submitted changes 
which address this to the clamav folks(avoiding tempfile()), but they 
have not been accepted as yet.  To avoid this issue (and avoid clamd 
producing ERROR: ScanStream: Can't create temporary file. messages), 
setting MaxThreads to 1 should work, but will probably affect the 
behavior of client software that talks to it (possibly causing deadlocks).

Do you have any insight to help address the underlying socket issues in 
threaded programs would clearly help with clamd and every other multi 
threaded program which may not even know it has these issues.
Unfortunately not, but Corinna had.
clamav might not accept the tempfile() workaround when it's clearly 
cygwin's/newlib fault.

But they still have to fix (think about) their SESSION/SCAN socket 
protocol as you wrote there. This was really a great catch. CRLF would 
be easy to add.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: New user needs help

2005-01-30 Thread Igor Pechtchanski
On Sun, 30 Jan 2005, itzack s wrote:

 I would be very grateful if someone could explain to
 me the procedure for installing software on cygwin,i
 am new to this system but i am very keen to learn,Do i
 need some form of account to log on as root..Hope i
 dont sound to stupid.
 Thank you
Itzack

Your first problem: wrong list.  The cygwin-talk list that you sent this
to isn't for technical questions about Cygwin, so, unless you want highly
non-technical answers, you should have sent this to the main Cygwin
mailing list (where I'm addressing my reply, and setting the Reply-To
accordingly).

Now, your question is too vague.  Do you mean how do I install Cygwin
software?, or how do I, given a Cygwin installation, install some
particular bit of software from a source?, or something completely
different?

If it's the first, see http://cygwin.com/cygwin-ug-net/setup-net.html
(2 clicks away from the Cygwin homepage, select User's Guide from the
left menu, and then Help with setting up Cygwin with setup.exe).

If it's the second, see http://cygwin.com/cygwin-ug-net/programming.html
(again, from the User's Guide).  For most (portable) projects, you may be
able to use the exact same sequence of commands as you use on Linux.

If you were asking something other than those two, please clarify what you
wanted to know (but on the right list this time).
HTH,
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Why does cygwin1.dll use NtCreateFile() instead of CreateFile()

2005-01-30 Thread Dan Ch
I noticed that cygwin-1.5.12-1/winsup/cygwin/fhandler.cc
uses NtCreateFile() instead of CreateFile() on Windows NT based
operating systems (NT, 2000, 2003, XP) for opening files.  Why?  I
checked the archives for this mailing list and noted some activity
that discuses some side affects caused by using NtCreateFile()
instead of CreateFile() such as being able to use file names that are
off limits to normal Windows applications.  But I could not find
anything that explains the benefits of using NtCreateFile() instead
of CreateFile().


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Why does cygwin1.dll use NtCreateFile() instead of CreateFile()

2005-01-30 Thread Igor Pechtchanski
On Sun, 30 Jan 2005, Dan Ch wrote:

 I noticed that cygwin-1.5.12-1/winsup/cygwin/fhandler.cc
 uses NtCreateFile() instead of CreateFile() on Windows NT based
 operating systems (NT, 2000, 2003, XP) for opening files.  Why?  I
 checked the archives for this mailing list and noted some activity
 that discuses some side affects caused by using NtCreateFile()
 instead of CreateFile() such as being able to use file names that are
 off limits to normal Windows applications.  But I could not find
 anything that explains the benefits of using NtCreateFile() instead
 of CreateFile().

This is a reasonable question, with the answer buried in the (private)
archives of cygwin-developers.  I'm taking the liberty of quoting the
answer here:

On Fri, 16 Apr 2004, Corinna Vinschen wrote on cygwin-developers:

 I've changed fhandler_base::open to use NtCreateFile now.  After some
 head scratching and searching with google, I read that the Win32
 CreateFile call adds some access bits at its own will, namely the
 FILE_READ_ATTRIBUTES and SYNCHRONIZE bits.  The latter is a problem when
 a user has no FILE_READ_DATA permission on a file since that apparently
 seem to disallow requesting SYNCHRONIZE.

An aside to CGF and Corinna: I have seen (and mostly agree) with the
reasons for keeping the cygwin-developers archives private, but questions
like this may, IMO, occasionally require us to quote messages from there.
I feel that this particular quote was justified, but please let me know if
you don't think it was.
Igor
P.S. When someone's subscription request to cygwin-developers is approved,
does the welcome message contain the instructions for accessing the
archives?  If it does -- great.  If not, it should.
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Cron problem on Windows 2003

2005-01-30 Thread Igor Pechtchanski
On Fri, 28 Jan 2005, Pierre A. Humblet wrote:

 Igor Pechtchanski wrote:

  I don't know, I kind of prefer the way it's phrased in the openssh.README
  (i.e., a special note about the user privileges in Win2003, rather than a
  common description).  That README also has a nice step-by-step description
  of what sshd-host-config does, so that the users have the option to do the
  installation steps manually (or verify that the needed things were
  created).  But hey, I don't use cron extensively, and I certainly can't
  speak for new users...

 Thanks for the feedback, Igor.
 The need for the special user is generic to all services
 (sshd, crond, exim...). Instead of repeating the same
 info in all the readmes, I will refer to
 http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-switch
 although that section should be corrected and expanded.

Sounds like a good idea, Pierre.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Cygwin not passing return code to Windows?

2005-01-30 Thread Brian Bruns
Hello all,

I hope I'm not repeating a bug someone mentioned in the past, but here
goes.  I maintain one of the ports of ClamAV for windows, which I do
using Cygwin.

Up until Cygwin 1.5.12, the return code from stuff like clamscan was
being passed back to Windows, so programs outside of Cygwin could call
the binary and tell weather or not the program found a virus in the
file it scanned.

Now, in the latest snapshots, that is no longer the case.  See example
below using freshclam, but also applies to the other apps:

Cygwin1.dll from 1.5.12:

C:\clamav-devel\binfreshclam
ClamAV update process started at Sun Jan 30 14:58:31 2005
main.cvd is up to date (version: 29, sigs: 29086, f-level: 3, builder:
tomek)
daily.cvd is up to date (version: 692, sigs: 975, f-level: 4, builder:
ccordes)

C:\clamav-devel\binecho %ERRORLEVEL%
1


Cygwin1.dll from latest 1.5.13 snapshots:

C:\clamav-devel\binfreshclam
ClamAV update process started at Sun Jan 30 14:56:49 2005
main.cvd is up to date (version: 29, sigs: 29086, f-level: 3, builder:
tomek)
daily.cvd is up to date (version: 692, sigs: 975, f-level: 4, builder:
ccordes)

C:\clamav-devel\binecho %ERRORLEVEL%
-2147483392



Has the behavior been changed for a reason, or is this an unintended
side effect of something else?  I know running inside of Cygwin using
the bash shell, the return codes come back fine as expected with
either Cygwin1.dll.  This only seems to happen when running the
program outside of a full Cygwin shell.

My machine is Win2k SP4, but I've seen the same problems on XP and
2003.

Thanks all!

-- 
Brian Bruns
The Summit Open Source Development Group
http://www.sosdg.org  /  http://www.ahbl.org


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Cygwin not passing return code to Windows?

2005-01-30 Thread Christopher Faylor
On Sun, Jan 30, 2005 at 03:06:03PM -0500, Brian Bruns wrote:
Up until Cygwin 1.5.12, the return code from stuff like clamscan was
being passed back to Windows, so programs outside of Cygwin could call
the binary and tell weather or not the program found a virus in the
file it scanned.

Now, in the latest snapshots, that is no longer the case.  See example
below using freshclam, but also applies to the other apps:

The odd error return was unintentional but there will be a change in cygwin
1.5.13 -- the error return will match what you'd expect for a unix program.

So, this is what you should expect:

  c:\sh -c 'exit 1'
  c:\echo %errorlevel%
  256

This will be the behavior of the next snapshot.

cgf

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Updated: sed-4.1.3-1

2005-01-30 Thread Luke Kendall
On 29 Jan, Corinna Vinschen wrote:
  * regex addresses do not use leftmost-longest matching.  In other words, 
/.\+/ only looks for a single character, and does not try to find as 
many of them as possible like it used to do. 

Interesting: does that mean every existing script that relied on the old
behaviour must change?  I'm glad I stuck with the old /..*/ notation
when I wanted one or more repetitions!

So \+ now works the opposite of * (\+ = shortest, * = longest)?  And .\+
is now a synonym for a single .?  So, why would you use .\+?  Ah, I
see, it's a way of matching zero or one occurrences.  I would have
thought a new symbol would have made more sense for the new semantics,
so as to preserve backward compatibility.

Probably I've misunderstood.

luke


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Problem with 20050130 snapshot and ssh-agent

2005-01-30 Thread David Rothenberger
I tried using keychain with the 20050130 snapshot and encountered
the following problem. The command was run from an rxvt window
running bash.

% keychain ~/.ssh/id_dsa
KeyChain 2.0.3; http://www.gentoo.org/projects/keychain
 Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
 * All previously running ssh-agent(s) have been stopped.
 * Initializing /home/drothe/.keychain/tela-sh file...
 * Initializing /home/drothe/.keychain/tela-csh file...
 * Starting new ssh-agent
 * 1 more keys to add...
Enter passphrase for /home/drothe/.ssh/id_dsa: 
Error reading response length from authentication socket.
Error writing to authentication socket.
Could not add identity: /home/drothe/.ssh/id_dsa
 * Problem adding key...

David


Cygwin Configuration Diagnostics
Current System Time: Sun Jan 30 14:21:47 2005

Windows XP Professional Ver 5.1 Build 2600 Service Pack 2

Path:   C:\cygwin\home\drothe\bin
C:\cygwin\usr\local\bin
C:\cygwin\bin
c:\jdk1.2.2\bin
c:\oracle\ora817\bin
C:\cygwin\bin
C:\cygwin\usr\X11R6\bin
c:\program files\gpg-1.4.0
C:\cygwin\sbin
c:\WINDOWS\system32
c:\WINDOWS
c:\WINDOWS\System32\Wbem
c:\Program Files\Executive Software\Diskeeper\
c:\MSSQL7\BINN
c:\Program Files\ATI Technologies\ATI Control Panel
c:\Program Files\SSH Communications Security\SSH Secure Shell

Output from C:\cygwin\bin\id.exe (nontsec)
UID: 1003(drothe) GID: 513(None)
513(None)

Output from C:\cygwin\bin\id.exe (ntsec)
UID: 1003(drothe)   GID: 513(None)
0(root) 513(None)   544(Administrators) 545(Users)

SysDir: C:\WINDOWS\system32
WinDir: C:\WINDOWS

CYGWIN = `server'
HOME = `C:\cygwin\home\drothe'
MAKE_MODE = `unix'
PWD = `/netrel/uploads'
USER = `drothe'

ALLUSERSPROFILE = `C:\Documents and Settings\All Users'
APPDATA = `C:\Documents and Settings\drothe\Application Data'
AUTOSSH_LOGFILE = `/var/log/autossh.log'
COLORFGBG = `0;default;15'
COLORTERM = `rxvt-xpm'
COMMONPROGRAMFILES = `C:\Program Files\Common Files'
COMPUTERNAME = `TELA'
COMSPEC = `C:\WINDOWS\system32\cmd.exe'
CVSROOT = `:ext:[EMAIL PROTECTED]:/home/drothe/cvsroot'
CVS_RSH = `/usr/local/bin/ssh-noescape'
DISPLAY = `:0'
FP_NO_HOST_CHECK = `NO'
GNU_HOME = `c:/cygwin'
HOMEDRIVE = `C:'
HOMEPATH = `\Documents and Settings\drothe'
HOSTNAME = `tela'
INFOPATH = 
`/usr/local/info:/usr/info:/usr/share/info:/usr/autotool/devel/info:/usr/autotool/stable/info:'
JAVA_HOME = `c:/jdk1.2.2'
JPROFILER_JAVA_HOME = `c:\jdk1.4.2'
LOGONSERVER = `\\TELA'
LS_COLORS = 
`no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:ex=00;32:*~=05;31:*.mtxt=05;31:*.ndx=05;31:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.c=01;36:*.h=01;36:*.pl=01;36:*.pm=01;36:*.cgi=01;36:*.java=01;36:*.html=01;36:*.tar=01;31:*.tgz=01;31:*.gz=01;31:*.tgz=01;31:*.bz2=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.jpg=01;35:*.jpeg=01;35:*.JPG=01;35:*.gif=01;35:*.GIF=01;35:*.bmp=01;35:*.BMP=01;35:*.xbm=01;35:*.ppm=01;35:*.xpm=01;35:*.tif=01;35:'
MANPATH = 
`/usr/local/man:/usr/man:/usr/share/man:/usr/autotool/devel/man::/usr/ssl/man:/usr/X11R6/man'
NUMBER_OF_PROCESSORS = `2'
OLDPWD = `/tmp'
ORA81_HOME = `c:/oracle/ora817'
ORA81_HOME_WIN = `c:\oracle\ora817'
ORA9_HOME = `c:/oracle/ora920'
ORA9_HOME_WIN = `c:\oracle\ora920'
ORA_HOME = `c:/oracle/ora817'
ORA_HOME_WIN = `c:\oracle\ora817'
OS = `Windows_NT'
OSTYPE = `cygwin'
PATHEXT = `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
PERLIO = `perlio'
PKG_CONFIG_PATH = `/usr/X11R6/lib/pkgconfig'
PRINTER = `Epson Stylus COLOR 800 ESC/P'
PROCESSOR_ARCHITECTURE = `x86'
PROCESSOR_IDENTIFIER = `x86 Family 15 Model 2 Stepping 9, GenuineIntel'
PROCESSOR_LEVEL = `15'
PROCESSOR_REVISION = `0209'
PROGRAMFILES = `C:\Program Files'
PROMPT = `$P$G'
PROMPT_COMMAND = `echo -ne \033]0;[EMAIL PROTECTED]: ${PWD}\007'
PS1 = `\! \W '
SESSIONNAME = `Console'
SHLVL = `1'
SSH_AGENT_PID = `4868'
SSH_AUTH_SOCK = `/tmp/ssh-viTlzXM756/agent.756'
SYSTEMDRIVE = `C:'
SYSTEMROOT = `C:\WINDOWS'
TEMP = `c:\DOCUME~1\drothe\LOCALS~1\Temp'
TERM = `xterm'
TMP = `c:\DOCUME~1\drothe\LOCALS~1\Temp'
USERDOMAIN = `TELA'
USERNAME = `drothe'
USERPROFILE = `C:\Documents and Settings\drothe'
WINDIR = `C:\WINDOWS'
WINDOWID = `168116664'
WL81_HOME = `c:/bea/weblogic81'
WL_HOME = `c:/weblogic510'
_ = `/bin/cygcheck'
POSIXLY_CORRECT = `1'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
  (default) = `/cygdrive'
  cygdrive flags = 0x002a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = `C:\cygwin'
  flags = 0x000a
HKEY_LOCAL_MACHINE

Re: Why does cygwin1.dll use NtCreateFile() instead of CreateFile()

2005-01-30 Thread Dan Ch
On Sun, 30 Jan 2005, Igor Pechtchanski wrote:
 On Sun, 30 Jan 2005, Dan Ch wrote:
  I noticed that cygwin-1.5.12-1/winsup/cygwin/fhandler.cc
  uses NtCreateFile() instead of CreateFile() on Windows NT based
  operating systems (NT, 2000, 2003, XP) for opening files.  Why?  I
  checked the archives for this mailing list and noted some activity
  that discuses some side affects caused by using NtCreateFile()
  instead of CreateFile() such as being able to use file names that are
  off limits to normal Windows applications.  But I could not find
  anything that explains the benefits of using NtCreateFile() instead
  of CreateFile().

 This is a reasonable question, with the answer buried in the (private)
 archives of cygwin-developers.  I'm taking the liberty of quoting the
 answer here:

 On Fri, 16 Apr 2004, Corinna Vinschen wrote on cygwin-developers:
  I've changed fhandler_base::open to use NtCreateFile now.  After some
  head scratching and searching with google, I read that the Win32
  CreateFile call adds some access bits at its own will, namely the
  FILE_READ_ATTRIBUTES and SYNCHRONIZE bits.  The latter is a problem
  when a user has no FILE_READ_DATA permission on a file since that
  apparently seem to disallow requesting SYNCHRONIZE.

Thank you for providing some information.  But I do not understand
what types of objects require read permission in order to successfully
open with SYNCHRONIZE access.  On Windows XP Professional SP2, using
CreateFile(...,GENERIC_WRITE | SYNCHRONIZE, ...) to open an ordinary
file on a local drive that has write-only permissions does not seem
to be a problem.  I am primarily interested in the buggy behavior
that a user would experience if CreateFile() was used instead
of NtCreateFile().


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Why does cygwin1.dll use NtCreateFile() instead of CreateFile()

2005-01-30 Thread Reini Urban
Dan Ch schrieb:
Thank you for providing some information.  But I do not understand
what types of objects require read permission in order to successfully
open with SYNCHRONIZE access.  On Windows XP Professional SP2, using
CreateFile(...,GENERIC_WRITE | SYNCHRONIZE, ...) to open an ordinary
file on a local drive that has write-only permissions does not seem
to be a problem.  I am primarily interested in the buggy behavior
that a user would experience if CreateFile() was used instead
of NtCreateFile().
Special filenames in subdirs like con,prn,aux,nul,lpt1 et al do not work 
with CreateFile(), but do work as plain files with NtCreateFile().

See attached test.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/


testcreate.cc
Description: application/clevercontent20
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/

Hyperthreading problem: remote access

2005-01-30 Thread Joris van der Sande
The hyperthreading problem reproduces perfectly on my 
Hush ATX 2.8 GHz P4 (www.hush-pc.com): building my 
application fails consistent (within 1 minute) with 
hyperthreading enabled.

Since my machine is on-line 24/7, would it help if I 
gave Christopher (or another motivated developer) remote 
access (via ssh/vnc/x or whatever)?

/Joris
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


customizing bash

2005-01-30 Thread vshastri
Hi,

  I am a new cygwin user. I am not able to locate the .profile, .login .bashrc 
etc bash files, so I can use it to customize bash. I understand from various 
installation instruction that I red that the HOME env variable needs to be set 
for this.  I followed the instructions given in many cygwin guides and install 
docs and updated my HOME environment variable both in my Windows system 
environment variable tab as

HOME=C:\Documents and Settings\vshastri

 

And updated in cygwin.bat as follows before starting the bash shell:

@echo off

C:
chdir C:\cygwin\bin
set HOME=C:\Documents and Settings\vshastri

bash --login i

 

I verified my update when I printed my environment variables and got the 
following (only showing relevant fields):

$ env

!::=::\

!C:=C:\cygwin\bin

ALLUSERSPROFILE=C:\Documents and Settings\All Users

ANT_HOME=C:\ant-1.6.2

APPDATA=C:\Documents and Settings\vshastri\Application Data

CATALINA_HOME=C:\jakarta-tomcat-5.5.4

COMMONPROGRAMFILES=C:\Program Files\Common Files

.

CVS_RSH=/bin/ssh

FP_NO_HOST_CHECK=NO

HOME=/cygdrive/c/Documents and Settings/vshastri

HOMEDRIVE=C:

HOMEPATH=\Documents and Settings\vshastri

HOMESHARE=\\nas\users



OLDPWD=/cygdrive/c/cygwin/usr/bin

OS=Windows_NT

 

Despite all these setup, I am still not able to see the creation of .profile, 
.login etc

Please Help. How do I setup and access these files so I can ustomize my shell?

Thanks

Viji



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Hyperthreading problem: remote access

2005-01-30 Thread Larry Hall
At 07:45 PM 1/30/2005, you wrote:
The hyperthreading problem reproduces perfectly on my Hush ATX 2.8 GHz P4 
(www.hush-pc.com): building my application fails consistent (within 1 minute) 
with hyperthreading enabled.

Since my machine is on-line 24/7, would it help if I gave Christopher (or 
another motivated developer) remote access (via ssh/vnc/x or whatever)?


Chris has already answered that question earlier in the discussion.  He 
needs physical access to the machine to resolve this problem.  Remote
access isn't enough.



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


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Updated: sed-4.1.3-1

2005-01-30 Thread Igor Pechtchanski
On Mon, 31 Jan 2005, Luke Kendall wrote:

 On 29 Jan, Corinna Vinschen wrote:
   * regex addresses do not use leftmost-longest matching.  In other words,
 /.\+/ only looks for a single character, and does not try to find as
 many of them as possible like it used to do.

 Interesting: does that mean every existing script that relied on the old
 behaviour must change?  I'm glad I stuck with the old /..*/ notation
 when I wanted one or more repetitions!

I believe you are confused here.  Yes, every script that *relied* on the
old behavior will have to change, but the number of those is vastly
smaller than you seem to think.  Very few scripts actually rely on this;
the only ones that will behave differently are scripts like

sed -e '/^\(.\+\)/s//---\1---/'

where the regex address pattern is saved and used in the subsequent
replacement (and is not anchored on the right side).  The above script
will turn abcde into ---a---bcde with the new behavior, and
---abcde--- with the old one.  Note that the pattern has to be
unanchored on the right for the behavior to change; the behavior of

sed -e '/^\(.\+\)$/s//---\1---/'

should stay the same.  BTW, the latter script *is* the way to fix for the
former (they were equivalent under the old behavior).

 So \+ now works the opposite of * (\+ = shortest, * = longest)?  And .\+
 is now a synonym for a single .?  So, why would you use .\+?

No, .\+ still means one or more.  It's just when you say

sed -e '/^abc.\+/d'

to delete all lines that start with abc, sed will no longer have to go
through the whole line to determine that it starts with abc (as it used
to).  Note that the above was a pretty silly way of writing this anyway,
as '/^abc./d' would have sufficed.

 Ah, I see, it's a way of matching zero or one occurrences.  I would have
 thought a new symbol would have made more sense for the new semantics,
 so as to preserve backward compatibility.

 Probably I've misunderstood.

I believe so.  Unless I, too, am totally confused.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Why does cygwin1.dll use NtCreateFile() instead of CreateFile()

2005-01-30 Thread Dan Ch
On Sun, 30 Jan 2005, Reini Urban wrote:
 Dan Ch schrieb:
  Thank you for providing some information.  But I do not understand
  what types of objects require read permission in order to successfully
  open with SYNCHRONIZE access.  On Windows XP Professional SP2, using
  CreateFile(...,GENERIC_WRITE | SYNCHRONIZE, ...) to open an ordinary
  file on a local drive that has write-only permissions does not seem
  to be a problem.  I am primarily interested in the buggy behavior
  that a user would experience if CreateFile() was used instead
  of NtCreateFile().

 Special filenames in subdirs like con,prn,aux,nul,lpt1 et al do not work
 with CreateFile(), but do work as plain files with NtCreateFile().

Thank you for your answer and sample program.  I think being able to
use reserved names like con and prn for ordinary files is a negative
instead of a positive.  Files with these names can not be deleted or
renamed with rm or Windows Explorer unless you know the secret
prefix that was mentioned on this list several months ago.  Note that
the current version (1.5.12-1) of Cygwin checks for these names
before deciding whether to use NtCreateFile() or CreateFile() which
prevents these names from being used for ordinary files.

I am still interested if old (pre NtCreateFile()) versions of Cygwin
had buggy behavior other than not being able to use reserved file
names that required switching to NtCreateFile() to solve.


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: _AS_DETECT_BETTER_SHELL speedup

2005-01-30 Thread Stepan Kasal
Hello,

On Sat, Jan 29, 2005 at 06:34:19AM -0800, Noah Misch wrote:
 On Sat, Jan 29, 2005 at 03:03:53PM +0100, Alexandre Duret-Lutz wrote:
  $ strace bash -c '{ foo; } 2/dev/null' 21 | grep clone
  clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, 
  child_tidptr=0xb7f93bc8) = 19138
...
 It indeed turns out that `bash' and the V7 Bourne shell fork in all three 
 cases,
 `ash' and `pdksh' fork only in the first two, and `zsh' forks for none.

I had to use
$ strace bash -c '{ foo; } 2/dev/null' 21 | grep fork
with my Linux 2.4.x kernel.

But yes, this proves that { ...; } has no advantage over (exec ...).

This also means that we don't need any benchmark from the Cygwin people.
(I apologize to cygwin subscribers.)

Thank you, Alexandr,
Stepan Kasal

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Unable to properly execute a let statement from a shell script

2005-01-30 Thread Paolo Gesmundo
Hi all,
I am running bash on XP
I have a very simple script a.sh
a.sh:

export P=1
let Q=$P+1
echo P=$P
echo Q=$Q

Case 1)
If at prompt I run:
a.sh
let: not found
P=1
Q=
Case 2)
If I run:
bash a.sh
P=1
Q=2
I know that I could modify a.sh by adding #!/bin/bash
at the top of the file but I would need to avoid this
otherwise I have to modify too many scripts
Is there a way to run a.sh like in Case 1 and get the
proper result like in Case 2?
Thanks
Paolo
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: Unable to properly execute a let statement from a shell script

2005-01-30 Thread Jani Tiainen
Paolo Gesmundo kirjoitti:
Hi all,
I am running bash on XP
I have a very simple script a.sh
a.sh:

export P=1
let Q=$P+1
echo P=$P
echo Q=$Q

Case 1)
If at prompt I run:
a.sh
let: not found
P=1
Q=
Case 2)
If I run:
bash a.sh
P=1
Q=2
I know that I could modify a.sh by adding #!/bin/bash
at the top of the file but I would need to avoid this
otherwise I have to modify too many scripts
Is there a way to run a.sh like in Case 1 and get the
proper result like in Case 2?
No. Because there is no specifiaction which shell system must use if you 
omit that from first comment line. It can use same as users, or sh, csh, 
ksh, bash or what ever it might comeup.

So you have to but it there to be sure, and by using simple script you 
can do it in a batch so there is very little manual work needed.

So, script execution (note that running script is _always_ done in new 
shell process in *nix style system) is a bit different from Windows/DOS 
batch files.

--
Jani Tiainen
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/