Re: Login shell?

2007-01-17 Thread Thorsten Kampe
* Luke Kendall (Wed, 17 Jan 2007 13:29:31 +1100 (EST))
> I just want to confirm, that the traditional Cygwin way of achieving
> this same result is still to modify cygwin.bat on a PC-by-PC basis
> (assuming one user per PC), rather than to take the traditional Unix
> way and change the shell field in /etc/passwd?

If you want to change your login shell you modify the passwd file. 
cygwin.bat is just a target for the shortcut. I think the zsh 
maintainer has a batch file that creates links to start zsh instead of 
bash.


--
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 open(...) serial port /dev/com20 and tcgetattr(...)

2007-01-17 Thread Stan Pinte
Hello,

accessing serial port under cygwin, with ids above 10 is broken:

Using "/dev/com20" results in a "No such file or directory" error.

#include 
#include 
#include 

int main (int argument_count, char * arguments [])   
{   
printf("opening com20:");
int fd = open("/dev/com20", O_RDONLY | O_NONBLOCK);   
perror(NULL);
struct termios options;
int result = tcgetattr(fd, &options);
perror(NULL);   
}

The following post:
http://www.cygwin.com/ml/cygwin/1999-12/msg00323.html says I should use

".\\com20" instead of "/dev/com20". If I do that, the call to open(...) 
succeed, 
but the call to tcgetattr raises a "Inappropriate ioctl for device" error.

I checked the example using "/dev/com3", and it works all right, so the
issue is limited to ports id above 9.

I already checked the following posts:
http://sourceware.org/ml/insight/2004-q4/msg00078.html, so it seems to
be a bug.

Do you have a workaround for this?

Kind regards,

Stan.



signature.asc
Description: OpenPGP digital signature


Re: 1.7.0 CVS mmap failure

2007-01-17 Thread Corinna Vinschen
On Jan 16 17:28, Brian Ford wrote:
> On Wed, 10 Jan 2007, Brian Ford wrote:
> 
> > On Wed, 10 Jan 2007, Corinna Vinschen wrote:
> >
> > > I implemented the above mentioned technique, which isn't much code
> > > anyway.  It reserves a memory lot big enough to fit in the whole
> > > mapping, memorizes the address, free's the memory again and then uses
> > > the new address in the subsequent real mappings.
> > >
> > > This should work (knock on wood) on all systems now.  My testcases still
> > > work on my 512 MB machine, so I'd appreciate if you could give the latest
> > > snapshot a try on /3GB enabled machines.
> >
> > Yes, this fixes my STC and the application from which it was derived.
> > Thanks.
> 
> But, it breaks another application that supplies a suggested mmap address
> (not MAP_FIXED) that is not available.  The VirtualAlloc needs a retry in
> that case.

Ouch, right.  I'll fix that.

> Maybe the retries can then be removed from the other two
> locations?

They might be unnecessary now, but OTOH they don't hurt.  I'll add
a comment but keep the code for now.

> PS: In an strace of this, I see three fstat64s called from within a
> single mmap64.  Do you know where they all are, and if two should be
> optimized away?

There's only one such call in list::set.

Your observation is strange.  The first mapping, which really maps the
file, calls fstat.  The second (valid remainder) and third (sigbus area)
mapping are anonymous mappings, which don't call fstat.  In my tests,
fstat64 is called only once for a file mapping.  STC?


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
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: Problem open(...) serial port /dev/com20 and tcgetattr(...)

2007-01-17 Thread Corinna Vinschen
On Jan 17 10:48, Stan Pinte wrote:
> Hello,
> 
> accessing serial port under cygwin, with ids above 10 is broken:
> 
> Using "/dev/com20" results in a "No such file or directory" error.

Try the more POSIXy "/dev/ttyS19" instead.  /dev/ttyS0 == /dev/com1
This is supposed to be supported up to /dev/ttyS63.

> The following post:
> http://www.cygwin.com/ml/cygwin/1999-12/msg00323.html says I should use
> 
> ".\\com20" instead of "/dev/com20". If I do that, the call to open(...) 
> succeed, 
> but the call to tcgetattr raises a "Inappropriate ioctl for device" error.

This posting is 7(!) years old.  Things have changed in the meantime.
Don't use the Windows notation "\\.\comXX".  It's not supported.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
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: Problem open(...) serial port /dev/com20 and tcgetattr(...)

2007-01-17 Thread Stan Pinte
Dear Corinna,

Thanks for your quick follow-up!

I tried the more POSIXy /dev/ttySxx, and they work until /dev/ttyS16.
This, and the next ones (I tested up to ttyS20) fail with a "No such
file or directory" error.

One note: I am using VSPD5 from eltima software to create virtual serial
ports under windows XP. However, all my other windows applications seem
to be perfectly able to taok to these virtuals serial ports.

Stan.

Corinna Vinschen a écrit :
> On Jan 17 10:48, Stan Pinte wrote:
>   
>> Hello,
>>
>> accessing serial port under cygwin, with ids above 10 is broken:
>>
>> Using "/dev/com20" results in a "No such file or directory" error.
>> 
>
> Try the more POSIXy "/dev/ttyS19" instead.  /dev/ttyS0 == /dev/com1
> This is supposed to be supported up to /dev/ttyS63.
>
>   
>> The following post:
>> http://www.cygwin.com/ml/cygwin/1999-12/msg00323.html says I should use
>>
>> ".\\com20" instead of "/dev/com20". If I do that, the call to open(...) 
>> succeed, 
>> but the call to tcgetattr raises a "Inappropriate ioctl for device" error.
>> 
>
> This posting is 7(!) years old.  Things have changed in the meantime.
> Don't use the Windows notation "\\.\comXX".  It's not supported.
>
>
> Corinna
>
>   




signature.asc
Description: OpenPGP digital signature


[ANNOUNCEMENT] Updated: readline-5.2.1-5, libreadline6-5.2.1-5

2007-01-17 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

A new release of readline and libreadline6, 5.2.1-5, is available for use,
replacing 5.2.1-4 as the current version.  5.1-5 remains the previous
version, to match the fact that a previous version of bash 3.1 is still
available.

NEWS:
=
This release merely switches to cygport packaging, now that a version of
cygport exists which is powerful enough for readline's needs.  There are
no functional changes (or if there are, it is a regression).

This version is not strictly binary compatible with readline 5.1; but the
only incompatibility is the removal of a cygwin-specific entry point that
the cygwin-specific bash 3.0 (but not bash 3.1) depended on.  Now that
bash 3.0 is no longer available from the cygwin mirrors, I felt it safe to
drop that cygwin-specific patch.

This version is not strictly behaviorally compatible with readline 5.1.  A
case has been reported where tab completion using bash 3.1 and readline
5.2 does not work quite right.  It is best to stick with either bash
3.1/readline 5.1, or upgrade both programs to bash 3.2.x/readline 5.2.x.
When you use setup.exe to upgrade, this should happen automatically.

See also the upstream documentation in /usr/share/doc/readline-5.2.1/.

DESCRIPTION:

The readline library will read a line from the terminal and return it,
allowing the user to edit the line with emacs or vi editing keys.  It also
allows a history feature, for editing previous entries, making command
line interfaces easier-to-use and more intuitive.

libreadline6 provides the .dlls needed for readline and history expansion
for dynamic linking in other programs, including bash and gdb; it is
required for a minimal cygwin installation.  The 6 in libreadline6
distinguishes incompatible API changes made to the prior libreadline4 and
libreadline5 libraries still available on the mirrors. readline provides
the documentation and the static libraries required for static linking;
you should only need it if you plan on compiling an application that links
with -lreadline or -lhistory.

UPDATE:
===
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.
Save it and run setup, answer the questions and pick up 'libreadline6'
from the 'Base' category (it should already be selected), or 'readline' in
the 'Devel' category.  Be sure that you do not have any cygwin programs
running during the upgrade.

DOWNLOAD:
=
Note that downloads from sources.redhat.com (aka cygwin.com) aren't
allowed due to bandwidth limitations.  This means that you will need to
find a mirror which has this update, please choose the one nearest to you:
http://cygwin.com/mirrors.html

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

- --
Eric Blake
volunteer cygwin readline maintainer

CYGWIN-ANNOUNCE UNSUBSCRIBE INFO:
=
To unsubscribe to 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.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFrjGl84KuGfSFAYARAkeLAKDOSYWXz+o9S6bYpHrkHc8Bs4595ACfZyYK
yl3qqtB4GO6JWw/m2h1wSpw=
=pxyg
-END PGP SIGNATURE-

--
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 1.5.23-2 : CREAD termios option don't work

2007-01-17 Thread Florent Morin

Hello,

Like you say, CREAD isn't the real problem.

I use select() to read/write socket and read/write serial. But, after
writing the content of socket on serial port, I can't read serial port
(access denied).

This is an extract of my source code :

 CODE -

   int serial_fd;
   int max_fd;

   unsigned char buffer[MAX_CANON];
   int size;
   int converted_size;

   unsigned char buffer2[MAX_CANON];
   int size2;

   fd_set read_set;
   fd_set write_set;

   nice(15);

   /* opening serial port read/write, non-block */
   serial_fd = open ( port_settings->device,
  O_NONBLOCK | O_RDWR | O_NOCTTY);

   max_fd = socket_fd < serial_fd ? serial_fd : socket_fd;

   alarm(ALARM_TIMEOUT);

   while (1) {
   FD_ZERO(&read_set);
   FD_SET(socket_fd, &read_set);
   FD_SET(serial_fd, &read_set);

   FD_ZERO(&write_set);
   FD_SET(socket_fd, &write_set);
   FD_SET(serial_fd, &write_set);

   if ( select(max_fd + 1,
   &read_set,
   &write_set,
   NULL,
   NULL) < 0)
   perror("select");

   if (FD_ISSET(socket_fd, &read_set)
&& !FD_ISSET(serial_fd, &read_set)
&& FD_ISSET(serial_fd, &write_set)) {
   alarm(0);
   memset(&buffer, 0, MAX_CANON);
   size = read(socket_fd, buffer, MAX_CANON - 1);
   converted_size = convert_telnet(&buffer, size);
   while (write(serial_fd, buffer, converted_size) < 0) {
   if (errno == EAGAIN) {
   error("write", 0);
   sleep(1);
   } else
   error("write", 1);
   }
   alarm(ALARM_TIMEOUT);
   }

   if (FD_ISSET(serial_fd, &read_set)
&& FD_ISSET(socket_fd, &write_set)) {
   alarm(0);
   memset(&buffer2, 0, MAX_CANON);
   printf("read serial");
   size2 = read(serial_fd, buffer2, MAX_CANON - 1);
   if (size2 > 0) {
   while (write(socket_fd, buffer2, size2) < 0) {
   if (errno == EAGAIN) {
   error("write", 0);
   sleep(1);
   } else
   error("write", 1);
   }
   }
   alarm(ALARM_TIMEOUT);
   }

   sleep(1);

   }

   close(serial_fd);

 /CODE -

I have tested it on Linux. It works fine. When I send data throw
telnet protocol, the data are received by the peripheral connected to
serial and vice-versa.

Perhaps I don't use the functions very well. So, if you can help me, thanks.

Florent Morin.


2007/1/12, Brian Ford <[EMAIL PROTECTED]>:

On Fri, 12 Jan 2007, Corinna Vinschen wrote:
> On Jan 11 16:53, Florent Morin wrote:
> > For testing, I have tried with a working program : stty. It works fine
> > with all options, but not with CREAD.
> >
> > $ stty cread < /dev/ttyS0
> > stty: /dev/ttyS0: unable to perform all requested operations
> >
> > Can someone explain this ?
>
> Please consider to debug this yourself.  Cygwin has no volunteer which
> is fluent with serial I/O right now.

This is not a regression from 1.5.18, which I know worked fine with serial
I/O.  I will try to test 1.5.23 when I get a chance, but I have no reason
to suspect it is broken.

CREAD appears to always be enabled but not indicated by tcgetattr or
controllable via tcsetattr right now.  So, the test case above is not
indicative of the original problem.

To the OP, posting your code might be informative.

--
Brian Ford
Lead Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained crew...



--
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/




--
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: Snapshot speed on managing files

2007-01-17 Thread Brian Ford
To clarify a few things...

On Tue, 16 Jan 2007, Larry Hall (Cygwin) wrote:

> Brian Ford wrote:
> > A quick look via Filemon doesn't show where the time is going.  But since
> > I don't regularly run this way, I'm not that interested in pursuing this
> > further.

This statement was with respect to "Virus Scan Enterprise 8.0.0 On Access
Scan Disabled" before Corinna's patch.  I did not test after her patch
because, as I said, I wasn't that interested in this (the OPs original)
case.

> > I regularly delete 100,000 files at a time under 1.5.18, and the rm return
> > is rather snappy.  About two weeks ago I was cleaning space of my drive
> > under a then current CVS build with On Access Scan enabled (before my 64k
> > I/O change, although I don't think that's relevant), and deleting a few
> > thousand files was very slow comparatively.  So, I presumed I had seen the
> > problem.
> >
> > Since I can't duplicate this observation now, I'm sorry for the wasted
> > effort.
>
> Did you update your build recently?

This observation was before her patch, and my attempt to reproduce it was
also pre-patch.  So, no.

> Corinna checked in a fix for this on Saturday
> .

My point was that her statements about her patch bringing only a
marginal performance increase, and the original code not being horribly
inefficient, appear correct despite my previous qualitative observation.

-- 
Brian Ford
Lead Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained crew...



--
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/



[ANNOUNCEMENT] Updated: CMake 2.4.6-1

2007-01-17 Thread Bill Hoffman

CMake CMake 2.4.6-1  is now available on Cygwin mirrors.

There has been a new release of the official cmake (2.4.6-1).
This is a minor release from 2.4.5 to 2.4.6

Changes in CMake 2.4.6

* Remove svn test in ctestctest3

* Fix for FIND_* order and framworks with PREFIX usage.

* Fix for FindDoxygen and quiet mode.

* Find JavaVM as well as jvm

* Look for ruby1.8 and ruby

* Fix for cpack .tgz.sh and dash

* Fix for finding custom commands from a full path with CMAKE_CFG_INTDIR.

* Fix for Borland make and custom commands that do nothing


Changes in CMake 2.4.5
* Fix for seg fault when a macro runs a bad command BUG# 3815

* Fix fix for foo.dll.lib that does not brea -L/usr/lib in link names

* Fix problem with LIBRARY_OUTPUT_PATH and linking to a dll foo.dll.lib
 instead of foo.lib

* Do not depend on optimized libraries for a debug build and visa versa.

* Fix target name matching custom command output conflict.
 
* Fix FindQt3 so that it does not find qt4


* Fix FindKDE4 so that it only looks for kde4-config

Changes in CMake 2.4.4

* CMake Version numbers on module directory

* elseif added

* Fix docs in CheckCSourceCompiles CheckCXXSourceCompiles and diagnostic
 output.

* added Check(C/CXX)SourceRuns.cmake, CheckCXXCompilerFlag.cmake, Check

* add static and shared flags to make sure the specified versions of
 libraries are used with -static -lfoo -shared -lbar

*  Search for the compiler only once and store a full path. avoids problems
 with PATH changes in cmake re-runs.

* make sure manifest files are generated with VS 8

* added FindASPELL.cmake, FindBZip2.cmake FindHPELL.cmake, FindJasper.cmake
 FindLibXml2.cmake, FindLibXslt.cmake, FindOpenSSL.cmake

* fix for bug#3646 GLUT not Glut for framework name

* many fixes for FindKDE3.cmake

* Better FindPNG that honors REQUIRED and looks in more places.

* Support to find python 2.5

* Find Qt3 better

* Find Qt4 better and work with qmake and qmake-qt4 on the same machine.

* Much better FindRuby.cmake

* More stuff marked as advanced in FindTcl and FindSDL

* FindwxWidgets runs shell script wx-config with sh

* Support for cpack and vs8 install libraries

* Darwin shared library create and Fortran now work

* Support for isystem directories INCLUDE_DIRECTORIES (SYSTEM)

* Targets in makefiles to create pre-processed files and assembly files
 can be turned off with these variables:
  CMAKE_SKIP_PREPROCESSED_SOURCE_RULES CMAKE_SKIP_ASSEMBLY_SOURCE_RULES

* Support for QNX

* Better default search paths for unix and FIND_* stuff

* Use link /lib and not lib to create static libraries with MS

* Useqt4 works with static qt4 and other fixes

* UseSwig.cmake interface to add extra dependencies.

* Added APPEND option to ADD_CUSTOM_COMMAND, Added VERBATIM option to
 ADD_CUSTOM_COMMAND and ADD_CUSTOM_TARGET

* add EXCLUDE_FROM_ALL option  for ADD_LIBRARY and ADD_EXECUTABLE

* Fix automatic computation of binary path to work for subdirectories of out
 of source directories.  This addresses bug#3592.

* --debug-ouput to cmake that gives stack trace to message send error 
commands.

 The stack trace is no longer there without it.

* + can be in a variable

* Do not replace @VAR@ syntax in list files.  This addresses bug #2722

* much faster depend scanning

* do depends on system include directories

* Permission and install directory fixes

* New target property _LOCATION (Debug, Release, etc)

* fix exclude from all in VS

* fix code completion problem in KDevelop

* Define MSYS when using msys generator

* fix referencece to projects outside the build tree VS 7,8

* Fix ZERO_CHECK to not always try and rebuild

* Fix Xcode universal binary rebuild problem

* add FILE_IS_NEWER to if command

* Add OPTIONAL to INSTALL command fix [EMAIL PROTECTED]

* add SORT and REVERSE to LIST command

* fix for seg fault bug #3815

* add SYBOLIC as a source file property see SET_SOURCE_FILES_PROPERTIES

* fix ctest valgrind if no coverage is done

* better message if bogus generator is specified.

* Better FindJava and FindJNI

* Fix doxygen.config for CMake

* add CPACK_MODULE_PATH

* Fix configuration for ctest dashboard targets Experimental, Nightly, etc

* Fix FindDoxygen for mac and app-bundles

* Fix CPack simple install test with NSIS

* Allow EXECUTE_PROCESS to strip trailing white space

* Fix mingw echo in makefiles

* Fix Xcode to not mess up -gdwarf-2

* Fix crash when "linking" to custom targets.

* Allow HEADER_FILE_ONLY to not compile the file in VS 7 and 8

* Fix mingw out of binary with spaces in the path.

* Fix for sudo make install (partial)

* Allow installed zlib, curl, expat, xmlrpc to be used.

* Add CMakeDependentOption.cmake module

* Allow projects to set install prefix default

* improved Find/Use wxWidgets

* add support for windows dll version numbers

* Fix message for -G when generator does not exist

* Fix html references in help

* Fix version on .exe cygwin

* allow global timeout in ctest

* Fix some odd cases with custom commands

RE: cygwin 1.5.23-2 : CREAD termios option don't work

2007-01-17 Thread Dave Korn
On 17 January 2007 14:38, Florent Morin wrote:


> I use select() to read/write socket and read/write serial. But, after
> writing the content of socket on serial port, I can't read serial port
> (access denied).


> I have tested it on Linux. It works fine. When I send data throw
> telnet protocol, the data are received by the peripheral connected to
> serial and vice-versa.
> 
> Perhaps I don't use the functions very well. So, if you can help me, thanks.


  :)  ser2net compiles on cygwin OOTB.


cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
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: Endianess not declared

2007-01-17 Thread Kovarththanan Rajaratnam

Hello

Dave Korn wrote:

On 16 January 2007 17:01, Kovarththanan Rajaratnam wrote:

~ $ md5sum /usr/include/ieeefp.h
21e83ac9763e6898351107c2f840be91 */usr/include/ieeefp.h


Ditto:

$ md5sum /usr/include/ieeefp.h
21e83ac9763e6898351107c2f840be91 */usr/include/ieeefp.h

--
Best Regards
Kovarththanan Rajaratnam


--
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: Endianess not declared

2007-01-17 Thread Dave Korn
On 17 January 2007 16:54, Kovarththanan Rajaratnam wrote:

> Hello
> 
> Dave Korn wrote:
>> On 16 January 2007 17:01, Kovarththanan Rajaratnam wrote:
>> 
>> ~ $ md5sum /usr/include/ieeefp.h
>> 21e83ac9763e6898351107c2f840be91 */usr/include/ieeefp.h
> 
> Ditto:
> 
> $ md5sum /usr/include/ieeefp.h
> 21e83ac9763e6898351107c2f840be91 */usr/include/ieeefp.h

/artimi/software/firmware $ grep -i endian /usr/include/ieeefp.h
#ifdef __IEEE_BIG_ENDIAN
#ifdef __IEEE_LITTLE_ENDIAN
#ifdef __IEEE_BIG_ENDIAN
#ifdef __IEEE_LITTLE_ENDIAN
/artimi/software/firmware $ grep -i error /usr/include/ieeefp.h
/artimi/software/firmware $ grep -i warning /usr/include/ieeefp.h
/artimi/software/firmware $

  Your turn!


cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
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: CR/LF problems after upgrade

2007-01-17 Thread Cary Jamison
Buchbinder, Barry (NIH/NIAID) [E] wrote:
> From: Luke Kendall
>> 
>> I wonder how many centuries of human endeavour has been
>> absorbed because of the decision to use CR+LF as line
>> endings in DOS?
>> 
>
> 
> To be fair, \r\n seems to go back to Gary Kildall's CP/M.
> http://en.wikipedia.org/wiki/Unprintable_characters
> 

As far as I know, Unix is actually the oddball, using only a single 
character to represent two actions on the old ttys, a carriage return 
followed by a line feed.  All oses I used before I was exposed to Unix had 
 line endings - these included various other mini and microcomputer 
oses of the late 70s early 80s era.

Note that it was important to send the carriage return *before* the line 
feed, to give the carriage head more time to actually return all the way to 
the start of the line.  If you did the line feed before the carriage return, 
the next character after the carriage return could start printing while the 
carriage was still returning!  (Actually, this is only true of really old 
style KSRs that didn't have much buffering, etc., but shows the history of 
\r\n.)

And now that I'm way off topic, I'll just add that if anyone else wants to 
continue reminiscing, lets take it to -talk.


Cary




--
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/



problems with bash and latest readline

2007-01-17 Thread burning shadow

After installing latest readline I have problems in bash. I have PS1
set to '\[\e]0;[EMAIL PROTECTED]:[EMAIL PROTECTED]:\w\$ ' and this gives me 
prompt with
1 extra space. If I change PS1 to '\[\e]0;[EMAIL PROTECTED]:[EMAIL 
PROTECTED]:\w\$', I
get 2 '$' signs in prompt: '[EMAIL PROTECTED]:~$$'.

[EMAIL PROTECTED]:~$$bash --version
GNU bash, version 3.2.9(10)-release (i686-pc-cygwin)

--
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: 1.7.0 CVS mmap failure

2007-01-17 Thread Brian Ford
On Wed, 17 Jan 2007, Corinna Vinschen wrote:

> On Jan 16 17:28, Brian Ford wrote:
>
> > PS: In an strace of this, I see three fstat64s called from within a
> > single mmap64.  Do you know where they all are, and if two should be
> > optimized away?
>
> There's only one such call in list::set.

which is called from map::add_list, yes.  I also see one in
map::get_list_by_fd.

> Your observation is strange.  The first mapping, which really maps the
> file, calls fstat.  The second (valid remainder) and third (sigbus area)
> mapping are anonymous mappings, which don't call fstat.

I don't think my three fstat64s correspond to your three mappings.

> In my tests, fstat64 is called only once for a file mapping.

Really?  I think I see them as follows:

mmap.cc:1203 mmap64():
  map_list = mmapped_areas.get_list_by_fd (fd);
mmap.cc:982 mmap_worker():
  if (!(map_list = mmapped_areas.get_list_by_fd (fd))
mmap.cc:983 mmap_worker():
  && !(map_list = mmapped_areas.add_list (fd)))

Also:

mmap.cc:1134 mmap64():
  DWORD low = GetFileSize (fh->get_handle (), &high);

> STC?

It looks like your statement is true for the first mmap in a process, but
subsequent mmaps have significant overhead.  In the attached STC, I count
5 fstat64s of the same fd via strace, plus the GetFileSize mentioned
above.

PS. Since this isn't a bug, I don't expect you to do any more than
consider putting it in your long term low priority que or reply with a PTC
Thanks for the evaluation tuits ;-).

-- 
Brian Ford
Lead Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained crew...

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 


int
main(int argc, const char *argv[])
{
char fname[PATH_MAX];
int  cnt;
int  fd;
struct stat  sb;
void*addr;

cnt= readlink("/proc/self/exe", fname, sizeof(fname));
fname[cnt] = '\0';

#define EXE_SUFFIX ".exe"
#define STRLEN_EXE_SUFFIX (sizeof(EXE_SUFFIX)-1)
if (cnt <= STRLEN_EXE_SUFFIX
|| strcasecmp(&fname[cnt-STRLEN_EXE_SUFFIX], EXE_SUFFIX))
strcpy(fname+cnt, EXE_SUFFIX);

fd = open(fname, O_RDONLY);
if (fd < 0)
{
perror("open self");
return -1;
}

if (fstat(fd, &sb) < 0)
{
perror("stat");
return -1;
}

addr = mmap(NULL, sb.st_size, (PROT_READ|PROT_WRITE),
(MAP_NORESERVE|MAP_PRIVATE), fd, 0);
if (addr == MAP_FAILED)
{
perror("mmap1");
return -1;
}

addr = mmap(NULL, sb.st_size, (PROT_READ|PROT_WRITE),
(MAP_NORESERVE|MAP_PRIVATE), fd, 0);
if (addr == MAP_FAILED)
{
perror("mmap2");
return -1;
}

close(fd);

puts("test passed");
return 0;
}
--
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/

Running .sh files on Cygwin

2007-01-17 Thread K. Basu

I am very new to Cygwin, and ran into the following problem while
trying to run a .sh file. On typing ./filename.sh at the prompt, I get
a series of  'command not found' errors on what I suppose are several
line numbers from the .sh file, followed by a syntax error near
unexpected token 'elf' and so on.

How should I fix this? Thanks for your help.

--
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: Running .sh files on Cygwin

2007-01-17 Thread Dave Korn
On 17 January 2007 19:47, K. Basu wrote:

> I am very new to Cygwin, and ran into the following problem while
> trying to run a .sh file. On typing ./filename.sh at the prompt, I get
> a series of  'command not found' errors on what I suppose are several
> line numbers from the .sh file, followed by a syntax error near
> unexpected token 'elf' and so on.
> 
> How should I fix this? Thanks for your help.


  Run d2u on your script file, it has the wrong kind of line-endings (DOS
style CRLF instead of *nix style LF).


cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
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: Running .sh files on Cygwin

2007-01-17 Thread Dave Korn
On 17 January 2007 20:06, Kasturi Basu wrote:

> Hi Dave,

  Hi KB, http://cygwin.com/acronyms#PPIOSPE please!
 
> Haven't used d2u before. A google search revealed several versions:
> http://linux.maruhn.com/sec/d2u.html Would you recommend any particular one?
> 

  The one that comes as part of cygwin!  If you don't already have it, use
setup.exe to install the cygutils package.


cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
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: problems with bash and latest readline

2007-01-17 Thread Eric Blake
burning shadow  gmail.com> writes:

> 
> After installing latest readline I have problems in bash. I have PS1
> set to '\[\e]0;\u  \h:\w\a\]\u  \h:\w\$ ' and this gives me prompt 
with
> 1 extra space. If I change PS1 to '\[\e]0;\u  \h:\w\a\]\u  \h:\w\$', I
> get 2 '$' signs in prompt: 'shadow  loshadka:~$$'.
> 
> shadow  loshadka:~$$bash --version
> GNU bash, version 3.2.9(10)-release (i686-pc-cygwin)
> 

Looks like cygport dutifully downloaded the upstream readline patch 1, but from 
your report, the patch wasn't applied during my build.  I'll have to tweak my 
cygport script, and upload readline-5.2.1-6 in the near future if that was 
indeed the problem.

Sorry for the regression.

-- 
Eric Blake
volunteer cygwin readline maintainer



--
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/



cygport patch - gpg_verify

2007-01-17 Thread Eric Blake
cygport generates .sig suffixes by default, but this typo was making 
verification of the cygwin patch fail as it looked for .sign suffixes.

$ diff -ub /bin/cygport{.orig,}
--- /bin/cygport.orig   2007-01-17 14:23:36.211079400 -0700
+++ /bin/cygport2007-01-17 14:23:52.318845000 -0700
@@ -2,7 +2,7 @@
 

 #
 # cygport - Cygwin packaging application
-# Copyright (C) 2006 Yaakov Selkowitz
+# Copyright (C) 2006, 2007 Yaakov Selkowitz
 # Provided by the Cygwin Ports project 
 # Distributed under the terms of the GNU General Public License v2
 #
@@ -482,11 +482,11 @@
local _filetype=${2};
local _sigext=${3:-sig};
 
-   if [ -f ${_file}.${sigext} ]
+   if [ -f ${_file}.${_sigext} ]
then
inform "${_filetype} signature follows:";
# we 'check_prog gpg' in src_prep
-   gpg --verify ${_file}.${sigext} ${_file};
+   gpg --verify ${_file}.${_sigext} ${_file};
else
inform "${_filetype} signature missing.";
fi



--
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: cygport patch - apply_patch

2007-01-17 Thread Eric Blake
apply_patch has a typo in 0.2.8 that breaks operation when trying to prep a 
package:

--- /bin/cygport.orig   2007-01-17 14:23:36.211079400 -0700
+++ /bin/cygport2007-01-17 14:39:54.305198900 -0700
@@ -532,10 +532,10 @@
 
while (( patchlevel <= 3 ))
do
-   if patch -N -s --dry-run -p${patchlevel} -i 
${patchfile} &> /dev/null
+   if patch -N -s --dry-run -p${patchlevel} -i 
${patchfile_name} &> /dev/null
then
inform "applying patch ${patchfile_name}:";
-   patch -N -p${patchlevel} -i ${patchfile} || 
error "patch ${patchfile_name} failed"
+   patch -N -p${patchlevel} -i ${patchfile_name} 
|| error "patch ${patchfile_name} failed"
break;
else
if (( patchlevel == 3 ))



--
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: cygport patch - apply_patch

2007-01-17 Thread Eric Blake
Eric Blake  byu.net> writes:

> 
> apply_patch has a typo in 0.2.8 that breaks operation when trying to prep a 
> package:

Nevermind that my suggestion had a typo as well.

-- 
Eric Blake


--- /bin/cygport.orig   2007-01-17 14:23:36.211079400 -0700
+++ /bin/cygport2007-01-17 14:39:54.305198900 -0700
@@ -532,10 +532,10 @@

while (( patchlevel <= 3 ))
do
-   if patch -N -s --dry-run -p${patchlevel} -i 
${patchfile} &> /dev/null
+   if patch -N -s --dry-run -p${patchlevel} -i 
${patchfile_path} &> /dev/null
then
inform "applying patch ${patchfile_name}:";
-   patch -N -p${patchlevel} -i ${patchfile} || 
error "patch ${patchfile_name} failed"
+   patch -N -p${patchlevel} -i ${patchfile_path} 
|| error "patch ${patchfile_name} failed"
break;
else
if (( patchlevel == 3 ))





--
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: Changed handling of "!" in /bin/sh?

2007-01-17 Thread Buchbinder, Barry \(NIH/NIAID\) [E]
Eric Blake wrote on Tuesday, January 16, 2007 10:18 PM:
> According to Luke Kendall on 1/16/2007 6:53 PM:
>> 
>> Or, copy /bin/ash.exe to replace /bin/sh.exe.
> 
> Not recommended.  The reason cygwin moved to bash as
> /bin/sh was to avoid ash bugs. 

I thought that it was more to avoid all the complaints
that sh did not behave like bash, which is what many
people expected.

- Barry

--
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: Changed handling of "!" in /bin/sh?

2007-01-17 Thread Christopher Faylor
On Wed, Jan 17, 2007 at 06:14:27PM -0500, Buchbinder, Barry (NIH/NIAID) [E] 
wrote:
>Eric Blake wrote on Tuesday, January 16, 2007 10:18 PM:
>> According to Luke Kendall on 1/16/2007 6:53 PM:
>>> 
>>> Or, copy /bin/ash.exe to replace /bin/sh.exe.
>> 
>> Not recommended.  The reason cygwin moved to bash as
>> /bin/sh was to avoid ash bugs. 
>
>I thought that it was more to avoid all the complaints
>that sh did not behave like bash, which is what many
>people expected.

You're right that was also a reason.

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/



Space in Dir Name with shell script and tar

2007-01-17 Thread Troy

I am trying to make a shell script to do automatic bckups with tar.

My problem is that tar stumbles on the spaces in the dir names if they are
in a variable.

Probiably best shown by example

The dir I want to back up is 
g:/Mark I+/Experimental Data/

I if do this in the script
tar -czvpf $NAME_OF_BACKUP.tgz /cygdrive/g/Mark' 'I+/Experimental' 'Data/*
it works fine but if I do this

DIRECTORY_TO_BACKUP="/cygdrive/g/Mark' 'I+/Experimental' 'Data"
tar -czvpf $NAME_OF_BACKUP.tgz $DIRECTORY_TO_BACKUP/*

I get 
tar: Removing leading `/' from member names
tar: /cygdrive/g/Mark': Cannot stat: No such file or directory
tar: 'I+/Experimental': Cannot stat: No such file or directory
tar: 'Data/*: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors

What am I doing wrong?
-- 
View this message in context: 
http://www.nabble.com/Space-in-Dir-Name-with-shell-script-and-tar-tf3031755.html#a8423703
Sent from the Cygwin Users mailing list archive at Nabble.com.


--
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/



no such file or directory error again and again.

2007-01-17 Thread Darren ha

I made cross-toolchain(gcc-4.1.0) for i686 on cygwin.

and using these, I am trying to compile kernel(2.6.17).
but there is some problem.

here is the log
-
LD sound/isa/cs423x/built-in.o   <- #1
LD sound/isa/es1688/built-in.o
LD sound/isa/gus/built-in.o
LD sound/isa/opti9xx/built-in.o
LD sound/isa/sb/built-in.o
LD sound/isa/wavefront/built-in.o
LD sound/isa/built-in.o
/i686-unknown-linux-gnu/bin/i686-unknown-linux-gnu-ld:
sound/isa/cs423x/built-in.o: No such file: No such file or directory
make[2]: *** [sound/isa/built-in.o] Error 1
make[1]: *** [sound/isa] Error 2
make: *** [sound] Error 2
-
as you can see above, sound/isa/cs423x/built-in.o is already made at
#1, but LD complains  there is no file.
I checked that file. certainly, that file doesn't exist.

compiling again, this error passed. at another place same pattern of
error is produced.
after 10 times of retry, I can make the kernel image finally.

so i tested busybox at this time. the error pattern is same.

How can i solve this problem?
Is there anyone who have this problem? only my cygwin environment
makes this kind of error ?

Thanks in advance.

p.s> I'm not in cygwin mailing list, so please CC me.

Best Regards
Darren

--
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: Space in Dir Name with shell script and tar

2007-01-17 Thread Enrique Perez-Terron

From: "Troy" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, January 18, 2007 2:50 AM
Subject: Space in Dir Name with shell script and tar




I am trying to make a shell script to do automatic bckups with tar.

My problem is that tar stumbles on the spaces in the dir names if they are
in a variable.

Probiably best shown by example

The dir I want to back up is
g:/Mark I+/Experimental Data/

I if do this in the script
tar -czvpf $NAME_OF_BACKUP.tgz /cygdrive/g/Mark' 'I+/Experimental' 'Data/*


Try this:

   tar -czvpf $NAME_OF_BACKUP.tgz "/cygdrive/g/Mark I+/Experimental Data"

That is, enclose the name of the directory in double quotation marks, and 
drop the trailing /*



it works fine but if I do this

DIRECTORY_TO_BACKUP="/cygdrive/g/Mark' 'I+/Experimental' 'Data"


Problem: You are enclosing the apostrophes in the double quotation marks. 
That means the

apostrophes become part of the value of the variable DIRECTORY_TO_BACKUP


tar -czvpf $NAME_OF_BACKUP.tgz $DIRECTORY_TO_BACKUP/*


Problem: Bash will replace the variable name with the variable's value, but 
it will not interpret
the apostrophes specially. Interpretation of apostrophes occur at an earlier 
stage. Next, bash
will perform word splitting on the variable's value. This means that the 
spaces contained in

the variable's value will be treated specially, as word splitting points.

Try this

DIRECTORY_TO_BACKUP="/cygdrive/g/Mark I+/Experimental Data"
tar -czvpf $NAME_OF_BACKUP.tgz "$DIRECTORY_TO_BACKUP"

i.e., enclose the variable's assigned value in double quotation marks (or 
apostrophes, if you prefer,
but for your convenience, use a single pair around all of the value. Next, 
enclose the variable
substitution in double quotation marks. This time it must be double quotes, 
not apostrophes,

since apostrophes prevent variable substitution.

You can tack /* at the end if you want, like this "$DIR"/* but if you want 
to back up everything
in the directory it is better to leave out /*. With /*, files and 
directories whose names begin with
a dot (like .bashrc) are *not* included in the backup. (This applies to 
files at the top level.

A file named "$DIR"/some-subdir/.bashrc is backed up with or without /*.)


I get
tar: Removing leading `/' from member names


This is normal.  You are specifying absoluth paths, and then, upon restore, 
you would be forced
to restore to exactly the same path. When tar removes the leading / it 
becomes possible to

restore the data to a different directory, eg to /restored/cygdrive/c/...

Here you see another point. It is better to do

cd "$DIR"
tar cvfpz bakupname.tgz .

with a single dot as the backup directory. Then, upon restore, you do not 
need to have a prefix

of directories cygdrive/c/...



tar: /cygdrive/g/Mark': Cannot stat: No such file or directory
tar: 'I+/Experimental': Cannot stat: No such file or directory
tar: 'Data/*: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors

What am I doing wrong?
--
View this message in context: 
http://www.nabble.com/Space-in-Dir-Name-with-shell-script-and-tar-tf3031755.html#a8423703

Sent from the Cygwin Users mailing list archive at Nabble.com.


--
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/







--
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: Space in Dir Name with shell script and tar

2007-01-17 Thread Troy

Thanks,

This worked

DIRECTORY_TO_BACKUP="/cygdrive/g/Mark I+/Experimental Data"
tar -czvpf $NAME_OF_BACKUP.tgz "$DIRECTORY_TO_BACKUP"

Troy

-- 
View this message in context: 
http://www.nabble.com/Space-in-Dir-Name-with-shell-script-and-tar-tf3031755.html#a8424281
Sent from the Cygwin Users mailing list archive at Nabble.com.


--
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: HISTFILE in zsh

2007-01-17 Thread Peter A. Castro

On Mon, 16 Jan 2007, Eli Barzilay wrote:


"Peter A. Castro" <[EMAIL PROTECTED]> writes:


On Sat, 23 Dec 2006, Eli Barzilay wrote:

Greetings, Eli,
   (Sorry for the long delay, vacation, etc etc.)


I'm having the same problem that is described at

 http://www.cygwin.com/ml/cygwin/2004-12/msg00195.html

I'm surprised that it was reported in 2004 -- I use cygwin on several
machines with no problems, it's only a new one that is having the
above symptom.

(Which is related to saving/loading the history file -- `fc -R foo'
and `fc -W foo' also hang.  Using strace, it looks like the problem is
some kind of an infinite loop that is related to a lock file for the
history file.)


I've seen this reported before, but I still can't seem to reproduce
it.  Can you collect the system info as per
http://www.cygwin.com/problems.html


You mean running cygcheck as said there?  I've put the results at
http://tmp.barzilay.org/zsh/.


Thanks, I've grabbed a copy.


In your debugging, what routine were you seeing the loop?  Was it zsh
code or cygwin code?  Was it a system call returning a bad value?  I'd
like to track this down finally.


I'm not sure, it's probably best if someone who knows more about
zsh/cygwin will look -- so I've ran another straced zsh, and dumped
the result in the same place.  (The bzipped file opens to about 50mb,
the fact that it compressed down to so little is a cute way to see
that something is stuck in an infinite loop...)


Ah, Ok, I see.  You just ran strace.  I was hoping you were in gdb or
something.  No matter.  That's Ok.  I'll debug it.


Lastly, have you tried the latest cygwin snapshot?


It was there when I posted, so it's supposed to still be pretty
recent.  I'm willing to try to update if you think it will help
(otherwise, I prefer to keep a working installation).


Ah.  No.  I was refering to http://www.cygwin.com/snapshots
You can get a pre-release copy of the latest cygwin before it's
officially released.  Often times this fixes peoples problems until it's
officially rolled out.

One more thing.  Can you send me the output from the 'setopt', 'env' and
'set' commands so I can see what you have set?  Be sure to remove any
sensitive information first.  Thanks!


(BTW, I'm reading/posting through Gmane, so please CC me.)


Sorry, but I'm not familiar with Gmane.  How would I go about CC'ing you
there?

--
Peter A. Castro <[EMAIL PROTECTED]> or <[EMAIL PROTECTED]>
"Cats are just autistic Dogs" -- Dr. Tony Attwood

--
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: HISTFILE in zsh

2007-01-17 Thread Eli Barzilay
"Peter A. Castro" <[EMAIL PROTECTED]> writes:

> > I'm not sure, it's probably best if someone who knows more about
> > zsh/cygwin will look -- so I've ran another straced zsh, and
> > dumped the result in the same place.  (The bzipped file opens to
> > about 50mb, the fact that it compressed down to so little is a
> > cute way to see that something is stuck in an infinite loop...)
> 
> Ah, Ok, I see.  You just ran strace.  I was hoping you were in gdb
> or something.  No matter.  That's Ok.  I'll debug it.

(Thanks, I'm too lazy to compile from source and retrieve all the
gdb-isms I used to know (not too many...).)


> >> Lastly, have you tried the latest cygwin snapshot?
> >
> > It was there when I posted, so it's supposed to still be pretty
> > recent.  I'm willing to try to update if you think it will help
> > (otherwise, I prefer to keep a working installation).
> 
> Ah.  No.  I was refering to http://www.cygwin.com/snapshots You can
> get a pre-release copy of the latest cygwin before it's officially
> released.  Often times this fixes peoples problems until it's
> officially rolled out.

Ah.  I prefer to avoid that -- it's important to me to have a working
environment, and hacking a simple history save/load thing is very
easy (and zsh still does it's thing with the history when it's
running, so I'm not really losing anything).


> One more thing.  Can you send me the output from the 'setopt', 'env'
> and 'set' commands so I can see what you have set?  Be sure to
> remove any sensitive information first.  Thanks!

Too big to attach, so I've put the results in the same place
(tmp.barzilay.org/zsh).  (My environment is roughly the same on Cygwin
and a bunch of Unix/Linux platforms, I don't have anything special in
my cygwin setup.)


> > (BTW, I'm reading/posting through Gmane, so please CC me.)
> 
> Sorry, but I'm not familiar with Gmane.  How would I go about CC'ing
> you there?

I meant CC me, as opposed to replying only to the list.  Gmane is a
mailing-list->news gateway which makes it easy to read mailing lists
as newsgroups -- but I don't check it too often.  (And drowning in
mailing lists, which is why Gmane can be very convenient.)

-- 
  ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
  http://www.barzilay.org/ Maze is Life!


--
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: Login shell?

2007-01-17 Thread Luke Kendall
On 17 Jan, Thorsten Kampe wrote:
>  * Luke Kendall (Wed, 17 Jan 2007 13:29:31 +1100 (EST))
> > I just want to confirm, that the traditional Cygwin way of achieving
> > this same result is still to modify cygwin.bat on a PC-by-PC basis
> > (assuming one user per PC), rather than to take the traditional Unix
> > way and change the shell field in /etc/passwd?
>  
>  If you want to change your login shell you modify the passwd file.

That's what we do, yes, because our modified cygwin.bat runs shell.exe,
not bash.
 
>  cygwin.bat is just a target for the shortcut.

But doesn't cygwin.bat run bash (not the shell specified in
/etc/passwd)?

> I think the zsh 
>  maintainer has a batch file that creates links to start zsh instead of 
>  bash.

That sounds like it doesn't use /etc/passwd.

Perhaps Michael should have called shell.exe login.exe :-)
shell.c is only 60-odd lines long.

Just to be quite explicit, here is our modified cygwin.bat:

@echo off
C:
chdir C:\cygwin\bin

shell

It seems neater to me than the current approach.

I'd like to propose making it an official part of Cygwin.  But I can't
do that since it's not my code: Michael Wardle wrote it (and submitted
it to this list).

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/



Re: Changed handling of "!" in /bin/sh?

2007-01-17 Thread Luke Kendall
On 17 Jan, Christopher Faylor wrote:
>  On Wed, Jan 17, 2007 at 06:14:27PM -0500, Buchbinder, Barry (NIH/NIAID) [E] 
> wrote: 
>  >Eric Blake wrote on Tuesday, January 16, 2007 10:18 PM: 
>  >> According to Luke Kendall on 1/16/2007 6:53 PM: 
>  >>>  
>  >>> Or, copy /bin/ash.exe to replace /bin/sh.exe. 
>  >>  
>  >> Not recommended.  The reason cygwin moved to bash as 
>  >> /bin/sh was to avoid ash bugs.  
>  > 
>  >I thought that it was more to avoid all the complaints 
>  >that sh did not behave like bash, which is what many 
>  >people expected. 
>   
>  You're right that was also a reason. 

Wow, I'm really showing my age, aren't I? :-)

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/