RE: mount usb drive for all user

2006-11-14 Thread cygwin . 20 . maillinglist

> -Original Message-
> From: Corinna Vinschen 
> Sent: Wednesday, October 18, 2006 10:28 AM
> To: cygwin@cygwin.com
> Subject: Re: mount usb drive for all user
> 
> On Oct 16 17:01, [EMAIL PROTECTED] wrote:
> > After the USB-Drive is connected I could cd to the root 
> directory of 
> > the USB-Drive.
> > But a ls does not show any file which I can see in the 
> Windows-Explorer.
> 
> Maybe a permission problem?  I can access my USB-Stick from 
> Cygwin just fine, with and without admin rights.
> 
> Assuming your USB drive is drive F: as in your cygcheck 
> output, please do the following:
> 
>   $ strace -o /tmp/ls.trace ls -l /cygdrive/f
> 
> and send the /tmp/ls.trace file to this list.  Hopefully 
> there's some clue in it.

I found the problem. My environment was to big. To make the output of
strace as small a possible shrink my environment. When I then call ls
everything runs ok.

Thanks for the help

   Franz
   


--
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: ld: cannot perform PE operations on not PE files ...

2006-11-14 Thread Salvatore D'Angelo

Brian and Dave,

thank for your answer. I will try both solutions. It seems to me that if 
I install binutils-cross, then I could use the same Makefile for Linux 
and CygWin. The only change should be


LD=...
AS=...

I tried to install this package from Internet setup, but I do not find 
it. I searched in all the category. In Devel I found only normal 
binutils. Please where I can get binutils-cross? Once I installed it how 
I can configure it in order to use i686-pc-linux as target machine?


In the Dave solution I noticed the size of final image is 528 instead of 
512 (the size of the bootsector) as in Linux. Why?


Thanks in advance 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: The newer version of Bash (Maybe after 3.1.6) brings something wrong for the executive operator `(backquote) in Makefile

2006-11-14 Thread Zhenghui Zhou

Thanks,
Zhenghui Zhou

2006/11/14, Dave Korn <[EMAIL PROTECTED]>:

On 14 November 2006 07:40, Zhenghui Zhou wrote:

> When execute makefile through make command, any compile line contains
> the executive operator `(backquote), likes `pkg-config --cflags
> gtk+-2.0`, would result in a compile error, reported by gcc/g++, which
> said ": No such file or directory".
>
> Any advice would be appreciated.

 Pipe it through d2u.

   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/




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



Excessive thrashing when popen()ing after a large malloc()

2006-11-14 Thread Loic Grenie
   The subjects says it all: when a process has a large memory space,
  a popen() triggers a long disk thrashing. The result can clearly be
  seen iwth the allegated cygtharsh program (running with 1GB of memory,
  change the size of the malloc to roughly half your memory size):

% ./cygthrash
  0.000 Before std
 48.318 After std
 67.654 Result: Tue Nov 14 11:29:03 2006
 67.700 After close std
  0.000 Before new
  0.720 After new
  1.106 Result: Tue Nov 14 11:29:04 2006
  1.107 After close new
  0.000 Before std
122.989 After std
131.007 Result: Tue Nov 14 11:31:15 2006
131.008 After close std

  Namely:  48 seconds for the first  popen
   19fgets
  123 second popen
8fgets

   The _popen function is a proposition for popen. Namely, I suggest to
  change in the popen function the lines:


switch (pid = vfork()) {
case -1:/* Error. */
(void)close(pdes[0]);
(void)close(pdes[1]);
free(cur);
return (NULL);
/* NOTREACHED */
case 0: /* Child. */
if (*type == 'r') {
if (pdes[1] != STDOUT_FILENO) {
(void)dup2(pdes[1], STDOUT_FILENO);
(void)close(pdes[1]);
}
if (pdes[0] != STDOUT_FILENO) {
(void) close(pdes[0]);
}
} else {
if (pdes[0] != STDIN_FILENO) {
(void)dup2(pdes[0], STDIN_FILENO);
(void)close(pdes[0]);
}
(void)close(pdes[1]);
}
execl(_PATH_BSHELL, "sh", "-c", program, NULL);
#ifdef __CYGWIN__
/* On cygwin32, we may not have /bin/sh.  In that
   case, try to find sh on PATH.  */
execlp("sh", "sh", "-c", program, NULL);
#endif
_exit(127);
/* NOTREACHED */
}


  to something similar to (warning: untested, needs a char *cmd; at the
  beggining):


  if (cmd = malloc(strlen(program)+64)) == NULL) {
(void)close(pdes[1]);
(void)close(pdes[2]);
free(cur);
return (NULL);
  }
  if (*type == 'r') {
if (pdes[1] != STDOUT_FILENO)
  sprintf(cmd, "sh -c '%s' >&%d %d>&-", program, pdes[1], pdes[1]);
else
  sprintf(cmd, "sh -c '%s'", program);
if (pdes[0] != STDOUT_FILENO)
  sprintf(cmd+strlen(cmd), " %d>&-", pdes[0]);
  }
  else {
if (pdes[0] != STDIN_FILENO)
  sprintf(cmd, "sh -c '%s' <&%d %d>&- %d>&-", program,
  pdes[0], pdes[0], pdes[1]);
else
  sprintf(cmd, "sh -c '%s' %d>&-", program, pdes[1])
  }
  pid = spawnl(_P_NOWAIT, _PATH_BSHELL, "sh", "-c", cmd, NULL);


With lots of thanks from the community who made that happen,

Loïc#include 
#include 
#include 
#include 
#include 


/***START***/
#include 
#include 
#include 
static int newpid;
static FILE *
_popen(char *cmd, char *mode)
{
  int fd[2];

  if (!pipe(fd)) {
char *str;

str = malloc(strlen(cmd)+64);
if (*mode == 'r')
  sprintf(str, "%s >&%d %d>&-", cmd, fd[1], fd[1]);
else
  sprintf(str, "%s <&%d %d>&-", cmd, fd[0], fd[0]);
newpid=spawnlp(_P_NOWAIT, "sh", "sh", "-c", str, NULL);
free(str);
if (*mode == 'r') {
close(fd[1]);
return fdopen(fd[0], "r");
}
else {
close(fd[0]);
return fdopen(fd[1], "w");
}
  }
  return NULL;
}
/*** END ***/

#define GET(tc)		gettimeofday(&tc, NULL);	\
			if (tc.tv_usec < ts.tv_usec) {	\
			tc.tv_usec += 100;	\
			tc.tv_sec -= 1;		\
			}\
			tc.tv_sec  -= ts.tv_sec;	\
			tc.tv_usec -= ts.tv_usec

int
main()
{
FILE *f;
char buf[1024];
struct timeval ts, tc;

malloc(1<<29);	/* 512 MB */

gettimeofday(&ts, NULL);
printf("%3d.%03d Before std\n", 0, 0);
f = popen("date", "r");
GET(tc);
printf("%3d.%03d After std\n", (int)tc.tv_sec, (int)tc.tv_usec/1000);
fgets(buf, sizeof buf, f);
GET(tc);
printf("%3d.%03d Result: %s", (int)tc.tv_sec, (int)tc.tv_usec/1000, buf);
pclose(f);
GET(tc);
printf("%3d.%03d After close std\n", (int)tc.tv_sec, (int)tc.tv_usec/1000);

gettimeofday(&ts, NULL);
printf("%3d.%03d Before new\n", 0, 0);
f = _popen("date", "r");
GET(tc);
printf("%3d.%03d After new\n", (int)tc.tv_sec, (int)tc.tv_usec/1000);
fgets(buf, sizeof buf, f);
GET(tc);
printf("%3d.%03d Result: %s", (int)tc.tv_sec, (int)tc.tv_usec/1000, buf);
kill(newpid, SIGTERM);
fclose(f);
kill(newpid, SIGKILL);
GET(tc);
printf("%3d.%03d After close new\n", (int)tc.tv_sec, (int)tc.tv_usec/1000);

gettimeofday(&ts, NULL);
printf("%3d.%03d

[ANNOUNCEMENT] Updated: cygwin-1.5.22-1

2006-11-14 Thread Corinna Vinschen
I've made a new version of the Cygwin DLL and associated utilities
available for download.  This is a bug fix release.  Only one minor
functional change has been made since 1.5.21-1.  As usual, a list
of what has changed is below.


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.

If you have questions or comments, please send them to the Cygwin
mailing list.  See http://cygwin.com/lists.html for details.

  *** 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://sourceware.org/lists.html#unsubscribe-simple

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

Corinna Vinschen
Red Hat


Changes since 1.5.21-1:

- Add 'hh', 'j', 't', and 'z' modifiers to printf(3). (Eric Blake)


Fixes since 1.5.21-1:

- Fix a case in fcntl where a F_UNLCK operation returns the wrong value.
  (corinna)

- Fix serial IO timeout problem. (corinna)

- Fix pread in case current file offset is non-zero. (Hideki Iwamoto)

- Fix permission problem in initgroups. (corinna)

- Don't allow empty environment variables. (cgf)

- Translate ERROR_MORE_DATA to EMSGSIZE. (cgf)

- Remove compilation problem in asm/byteorder.h header (Danny Smith)

- Always open files with backup/restore intent to emulate real "root"
  access.  Fix access(2) accordingly. (corinna)

- Import latest glob(3) from FreeBSD to overcome non-POSIXyness. (corinna)

- Fix rewinddir problem on WIndows 2000. (corinna)

- Print correct Win32 error number when aborting due to fatal error.
  (corinna)

- Change heap and mmap allocation to circumvent fork problems on
  Windows 2003 and Vista.  (corinna)

- Fix bug in opening raw disks.  (Joe Loh)

- Fix a bug in popen implementation. (Eric Blake)

- Un-constify _LIB_VERSION. (Patrick Mansfield)

- Fix memory leak when threads exit. (corinna)

--
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: ld: cannot perform PE operations on not PE files ...

2006-11-14 Thread Dave Korn
On 14 November 2006 09:58, Salvatore D'Angelo wrote:


> In the Dave solution I noticed the size of final image is 528 instead of
> 512 (the size of the bootsector) as in Linux. Why?

  Seems like your bootsect.out ended up containing __CTOR_LIST__ and
__DTOR_LIST__.  Are you /absolutely/ sure you remembered to give the '-r'
option to ld?

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: "Bash Here..." menu option "howto" reg-entry

2006-11-14 Thread Linda Walsh

Yes...it requires installing a separate executable program.

This "add bash prompt" requires no 3rd party binary and
uses programs already included in the cygwin base package.

The installable program also has a bug in that it invokes each
shell window as a separate user login, breaking the normal
windowing paradigm of one login (starting an X-server, for
example), followed by multiple client windows (that don't get
started as login windows).

Why install extra programs when it can all be done by adding
2 registry keys (1 for directories, 1 for drives)?

linda


Hugh McMaster wrote:

Hi Linda,

Just a quick note.  In the setup programme, there is an option to have
'Open Bash Prompt Here' context menu added to the right-click menu.

Hugh


On 11/11/06, Linda Walsh wrote:

After some time debugging I figured out a way to add a prompt option

to the right-click menu on directories and drives that works for
my alternate drives and network directories.  I think it should be
able to be generalized for other shells, but I use "Bash".

The reg-entry for directories is:
REGEDIT4

[HKEY_CLASSES_ROOT\Directory\shell\Bash Here...]

[HKEY_CLASSES_ROOT\Directory\shell\Bash Here...\Command]
@="C:\\bin\\ash.exe -c 'PATH=\"/bin:$PATH\"; test -z \"$SHELL\" &&
SHELL=C:binbash.exe;  cd \"%L\"; cygstart -d \"$PWD\" 
\"$SHELL\"'"


---(note, last line starting with "@" is all 1 line)
Assumptions:
1) Cygwin Drive Prefix=/#(mount -c '/')
2) Cygwin's directories are same under Cygwin and NT
   (cygwin not installed in a subdir)

It also uses "ash.exe", "test.exe" and "cygstart.exe", which
I believe are part of the base distribution.

Viewing a CD/DVD in drive E:, root dir, - right-click(menu),
   Pick "Bash Here...", brings up a bash-command window with
   current dir = "/e/

UNC pathnames show up as one would expect:
   //"sharename"/"dirname"

Advantages over other known methods:

1) no external programs required;
2) no "stacked" shell processes left in process table

Maybe the registry entries could go in a Cygwin FAQ entry?



--
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: "Bash Here..." menu option "howto" reg-entry

2006-11-14 Thread Frank Fesevur

Linda Walsh wrote:

Yes...it requires installing a separate executable program.

This "add bash prompt" requires no 3rd party binary and
uses programs already included in the cygwin base package.

The installable program also has a bug in that it invokes each
shell window as a separate user login, breaking the normal
windowing paradigm of one login (starting an X-server, for
example), followed by multiple client windows (that don't get
started as login windows).


The maintainer of chere reads this list, so I think he will respond.


Why install extra programs when it can all be done by adding
2 registry keys (1 for directories, 1 for drives)?


The answer is very simple to me. Because you can configure it much 
better and easier. Why should I *manually* edit a .reg file to change 
the paths? I don't like to have cygwin installed in c:\ as you 
apparently have. That is handled by chere for you.


Regards,
Frank

--
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 and find

2006-11-14 Thread Brian Dessent
[EMAIL PROTECTED] wrote:

> 4 10 * * 1-5 find 
> /cygdrive/d/Apps_v8p4//Bridge/DataFeed/deploy//quotefeed/logs
> -type f -name stdout.log\.* -mtime +2 > 
> /cygdrive/d/Apps_v8p4/Bridge/DataFeed/deploy/bin/testfind.log

The need for quoting the argument to -name is to keep the shell from
expanding globs (* and ?), so that they can be evalulated instead by
find.  This can be done either with quotes or backslashes, so I would
expect to see

-name stdout.log.\*

or

-name stdout.log\*

where the former would match only stdout.log.03Nov2006 and the latter
would match both that and stdout.log.  However, what you have:

-name stdout.log\.*

does not make any sense as the "." is not a glob character and does not
need to be quoted, leaving the "*" unprotected and vulnerable to shell
expansion if there happened to be a matching filename in the current
directory (although that typically results in syntax errors from find.) 
This could explain why it happens to work from the command line but not
in cron, but it's kind of a long shot.  I don't see any other common
cron problems (D is not a network drive and your mounts are
system-mode.)  In any case I would fix the quoting, regardless of other
issues.

Brian

--
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: Excessive thrashing when popen()ing after a large malloc()

2006-11-14 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Loic Grenie on 11/14/2006 4:12 AM:
>The subjects says it all: when a process has a large memory space,
>   a popen() triggers a long disk thrashing. The result can clearly be
>   seen iwth the allegated cygtharsh program (running with 1GB of memory,
>   change the size of the malloc to roughly half your memory size):

Indeed - the fork/exec model of the current popen implementation is harsh
on large memory spaces, compared to your proposed spawn model.  While the
idea may have merit, you have some work to do before a patch can be accepted.

> 
> 
>   to something similar to (warning: untested, needs a char *cmd; at the
>   beggining):

Hint - popen is implemented in newlib, not cygwin, so you are posting to
the wrong list.  Unless you provide a 'diff -u' patch, it is very
difficult to see your changes in context.  And admitting that your changes
are untested is not a good sign for getting it approved.

> 
> 
>   if (cmd = malloc(strlen(program)+64)) == NULL) {
> (void)close(pdes[1]);
> (void)close(pdes[2]);
> free(cur);
> return (NULL);
>   }
>   if (*type == 'r') {
> if (pdes[1] != STDOUT_FILENO)
>   sprintf(cmd, "sh -c '%s' >&%d %d>&-", program, pdes[1], pdes[1]);
> else
>   sprintf(cmd, "sh -c '%s'", program);

This mishandles a program that contains embedded '.

> if (pdes[0] != STDOUT_FILENO)
>   sprintf(cmd+strlen(cmd), " %d>&-", pdes[0]);

Won't work if cmd already contains redirections.  If you intend for your
redirection to occur first, you will have to do some more work.

>   }
>   else {
> if (pdes[0] != STDIN_FILENO)
>   sprintf(cmd, "sh -c '%s' <&%d %d>&- %d>&-", program,
>   pdes[0], pdes[0], pdes[1]);

I'm not sure your redirections are correct here.

> else
>   sprintf(cmd, "sh -c '%s' %d>&-", program, pdes[1])
>   }
>   pid = spawnl(_P_NOWAIT, _PATH_BSHELL, "sh", "-c", cmd, NULL);

Why are you going through two levels of sh?  That seems like a waste to
me; the whole idea of using spawn is to avoid a fork(), but when you
invoke "sh" "-c" "sh -c 'cmd'", you are right back to a fork.  True, the
new invocation of sh uses less memory than the 1 GB process that invoked
popen, so less thrashing will occur, but your whole approach seems
fundamentally flawed if you are trying to use spawn to avoid a fork.

- --
Life is short - so eat dessert first!

Eric Blake [EMAIL PROTECTED]
-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

iD8DBQFFWdN184KuGfSFAYARArdkAKCm4fzNrB0j3xv7X7eQNcoreCASswCeP3r3
N94x7ZElgUuI3Rw5Fw+X3j0=
=EhF9
-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/



Cron and find

2006-11-14 Thread will . wright
Hi,

I have a problem getting a find command which works fine on the command line
to work when run via cron.

The command is:

4 10 * * 1-5 find /cygdrive/d/Apps_v8p4//Bridge/DataFeed/deploy//quotefeed/logs
-type f -name stdout.log\.* -mtime +2 > 
/cygdrive/d/Apps_v8p4/Bridge/DataFeed/deploy/bin/testfind.log

This produces an empty "testfind.log" file but when run from the command
line I get:

$ find /cygdrive/d/Apps_v8p4//Bridge/DataFeed/deploy//quotefeed/logs -type
f -n
ame stdout.log\.* -mtime +2
/cygdrive/d/Apps_v8p4//Bridge/DataFeed/deploy//quotefeed/logs/stdout.log.03Nov20
06
/cygdrive/d/Apps_v8p4//Bridge/DataFeed/deploy//quotefeed/logs/stdout.log.06Nov20
06
/cygdrive/d/Apps_v8p4//Bridge/DataFeed/deploy//quotefeed/logs/stdout.log.07Nov20
06
/cygdrive/d/Apps_v8p4//Bridge/DataFeed/deploy//quotefeed/logs/stdout.log.08Nov20
06
/cygdrive/d/Apps_v8p4//Bridge/DataFeed/deploy//quotefeed/logs/stdout.log.09Nov20
06
/cygdrive/d/Apps_v8p4//Bridge/DataFeed/deploy//quotefeed/logs/stdout.log.10Nov20
06

...as expected.

I have read the thread http://www.cygwin.com/ml/cygwin/2005-12/msg00905.html
and scaned google, mailing lists etc but don't see anything of use.

I also tried making sure the user can see the directory from cron by making
a more simple "ls" job...

14 10 * * 1-5 ls /cygdrive/d/Apps_v8p4//Bridge/DataFeed/deploy//quotefeed/logs
> /cygdrive/d/Apps_v8p4/Bridge/DataFeed/deploy/bin/lstestfind.log

This produces the expected list in the output file:

quotefeed.log
quotefeed.log.1
quotefeed.log.10
quotefeed.log.11
quotefeed.log.12
quotefeed.log.13
quotefeed.log.14
quotefeed.log.15
quotefeed.log.16
quotefeed.log.17
quotefeed.log.18
quotefeed.log.19
quotefeed.log.2
quotefeed.log.20
quotefeed.log.3
quotefeed.log.4
quotefeed.log.5
quotefeed.log.6
quotefeed.log.7
quotefeed.log.8
quotefeed.log.9
stdout.log
stdout.log.03Nov2006
stdout.log.06Nov2006
stdout.log.07Nov2006
stdout.log.08Nov2006
stdout.log.09Nov2006
stdout.log.10Nov2006
stdout.log.13Nov2006
stdout.log.14Nov2006

So - it seems it can see the directory, but for some reason the find command
isn't happy... any ideas?

Have attached the cygcheck file as suggested.

Thanks for any help

Will



___

Tiscali Unlimited Broadband with FREE weekend calls only 12.99!
http://www.tiscali.co.uk/products/broadband/





cygcheck.out
Description: Binary data
--
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: [ANNOUNCEMENT] Updated: bash-3.2.3-5

2006-11-14 Thread Jan Bruun Andersen
I saw a couple of posts mentioning a problem with /bin/sh not being
updated and replaced with a copy of /bin/bash.

I had the same problem here yesterday/today, when I discovered that none
of my #!/bin/sh scripts was working. In fact, they did nothing!

I tried re-installing bash-3.2.3-5, I tried removing it (while ignoring
all warnings about dependencies) and installing (keeping) it, but /bin/sh
continued to be the same version from when I installed Cygwin back in
February 2006:

C:\cygwin\bin
> dir bash.exe sh.exe
 Volymen i enhet C har ingen etikett.
 Volymens serienummer är 141C-8ED0

 Innehåll i katalogen C:\cygwin\bin

2006-11-03  04:22   467 968 bash.exe

 Innehåll i katalogen C:\cygwin\bin

2006-02-08  19:03   451 072 sh.exe
   2 fil(er) 919 040 byte
   0 katalog(er)  22 278 008 832 byte ledigt

I had a look at the /etc/postinstall/00bash.sh.done and 01bash.sh.done
scripts and saw that they did some magic before calling
/etc/profile.d/00bash.sh.

I saw that the /etc/profile.d/00bash.sh tried to get the version from
/bin/sh, and tried that by hand by my CMD.EXE:

> \cygwin\bin\sh.exe --version

C:\cygwin\etc\profile.d
> \cygwin\bin\cygcheck.exe /bin/sh.exe
C:/cygwin/bin/sh.exe
  C:/cygwin/bin\cygwin1.dll
C:\WINDOWS\system32\ADVAPI32.DLL
  C:\WINDOWS\system32\ntdll.dll
  C:\WINDOWS\system32\KERNEL32.dll
  C:\WINDOWS\system32\RPCRT4.dll
  C:/cygwin/bin\cygintl-3.dll
C:/cygwin/bin\cygiconv-2.dll
  C:/cygwin/bin\cygreadline6.dll
C:/cygwin/bin\cygncurses-8.dll
C:\WINDOWS\system32\USER32.dll
  C:\WINDOWS\system32\GDI32.dll

Not being much wiser, I started a /bin/bash process, cd'ed to
/etc/profile.d and attempted to execute /etc/profile.d/00bash.sh:

$ cd /etc/profile.d/

[502] jba @ HERMETRIX /etc/profile.d
$ ll *bash*
-rwxr-x---+ 1 jba  839 Nov  3 04:22 00bash.csh
-rwxr-x---+ 1 jba 1942 Nov  3 04:22 00bash.sh

[503] jba @ HERMETRIX /etc/profile.d
$ /bin/bash -x ./00bash.sh
+ /bin/test /bin/sh.exe -ot /bin/bash.exe
++ cat /proc/2516/exename
+ /bin/test /bin/sh.exe -ef /usr/bin/bash.exe
+ test -f /bin/sh.exe
+ case `(cygcheck /bin/sh.exe) 2>&1` in
+ case `(/bin/sh.exe --version) 2>&1` in
+ return 0
./00bash.sh: line 29: return: can only `return' from a function or sourced
scrip
t
++ date '+%Y/%m/%d %T'
+ echo '2006/11/14 13:07:42 /etc/profile.d/00bash.sh:' 'Attempting to
update /bi
n/sh.exe'
+ /bin/cp -fpuv /bin/bash.exe /bin/sh.exe

[504] jba @ HERMETRIX /etc/profile.d

The copy succeded and I got my updated /bin/sh.exe:

$ cd /bin

[505] jba @ HERMETRIX /bin
$ ll bash.exe sh.exe
-rwxr-x---+ 1 jba 467968 Nov  3 04:22 bash.exe
-rwxr-x---+ 1 jba 467968 Nov  3 04:22 sh.exe

I don't know if this helps anyone understanding why the bash postinstall
scripts did not succeed in updating /bin/sh.

-- 
Jan Bruun Andersen


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



[Fwd: Re: ld: cannot perform PE operations on not PE files ...]

2006-11-14 Thread Salvatore D'Angelo
sorry  forgot to mention to put my address in cc since I am not 
subscribed to the list
--- Begin Message ---

Brian and Dave,

thank for your answer. I will try both solutions. It seems to me that if 
I install binutils-cross, then I could use the same Makefile for Linux 
and CygWin. The only change should be


LD=...
AS=...

I tried to install this package from Internet setup, but I do not find 
it. I searched in all the category. In Devel I found only normal 
binutils. Please where I can get binutils-cross? Once I installed it how 
I can configure it in order to use i686-pc-linux as target machine?


In the Dave solution I noticed the size of final image is 528 instead of 
512 (the size of the bootsector) as in Linux. Why?


Thanks in advance for your help.


--- End Message ---
--
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-1.5.22-1 -> cygwin1.dll.new, not cygwin1.dll

2006-11-14 Thread Lester Ingber
I just used setup.exe to upgrade to cygwin-1.5.22-1.  I rebooted, and I
got a error that cygwin1.dll could not be found.  Under Windows Explorer
I saw /bin/cygwin1.dll.new (no other cygwin1.dll[.] file), so I renamed
it to cygwin1.dll, and now everything seems to be working OK.

Is the postinstall broken?

I attach cygcheck -s -v -r > cygcheck.out.

Thanks.

Lester


--
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 CYGWIN remap my keys

2006-11-14 Thread Jonathan Arnold

Davin Pearson wrote:

I sent this message to comp.windows.cygwin but received no reply.

I have just installed Cygwin on my Mum's Windows XP Home computer and I
noticed that it rebinds some of the keys, such as


Sorry, but I'm not sure what you mean by "it".  What exactly are you
using that has the keys incorrect? Do you mean system-wide all these
keys are changed?

Sounds like some kind of international keyboard setup problem.

--
Jonathan Arnold   http://www.buddydog.org

When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.


--
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 and find

2006-11-14 Thread will . wright
Thanks for the tips Brian. I have updated my script accordingly but (as you
guessed) this has made no difference when run via cron. :(

___

Tiscali Unlimited Broadband with FREE weekend calls only 12.99!
http://www.tiscali.co.uk/products/broadband/



--
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: Excessive thrashing when popen()ing after a large malloc()

2006-11-14 Thread Loic Grenie
On Tue Nov 14 15:53:36 2006, Eric Blake ([EMAIL PROTECTED] ) wrote:
> According to Loic Grenie on 11/14/2006 4:12 AM:
>>The subjects says it all: when a process has a large memory space,
>>   a popen() triggers a long disk thrashing. The result can clearly be
>>   seen iwth the allegated cygtharsh program (running with 1GB of memory,
>>   change the size of the malloc to roughly half your memory size):

> Indeed - the fork/exec model of the current popen implementation is harsh
> on large memory spaces, compared to your proposed spawn model.  While the
> idea may have merit, you have some work to do before a patch can be accepted.

I did actually not submit a patch, I suggested a modification with some
  basic, untested, lines of code as a start.

>>   to something similar to (warning: untested, needs a char *cmd; at the
>>   beggining):

> Hint - popen is implemented in newlib, not cygwin, so you are posting to
> the wrong list.  Unless you provide a 'diff -u' patch, it is very
> difficult to see your changes in context.

Sorry, I'll try to write there, with an additional diff -u.

> And admitting that your changes are untested is not a good sign for
> getting it approved.

I'm not really "admitting", I am just expliciting that the patch is
  untested. I do not have the resources to build the thing.

  Sorry to have disturbed, happy cygwining,

 Loïc

--
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 and find

2006-11-14 Thread Will Wright
Thanks for the tips Brian. I have updated my script accordingly but (as
you
guessed) this has made no difference when run via cron. :(

-Original Message-
From: Brian Dessent [mailto:[EMAIL PROTECTED] 
Sent: 14 November 2006 11:12
To: cygwin@cygwin.com
Subject: Re: Cron and find

[EMAIL PROTECTED] wrote:

> 4 10 * * 1-5 find
/cygdrive/d/Apps_v8p4//Bridge/DataFeed/deploy//quotefeed/logs
> -type f -name stdout.log\.* -mtime +2 >
/cygdrive/d/Apps_v8p4/Bridge/DataFeed/deploy/bin/testfind.log

The need for quoting the argument to -name is to keep the shell from
expanding globs (* and ?), so that they can be evalulated instead by
find.  This can be done either with quotes or backslashes, so I would
expect to see

-name stdout.log.\*

or

-name stdout.log\*

where the former would match only stdout.log.03Nov2006 and the latter
would match both that and stdout.log.  However, what you have:

-name stdout.log\.*

does not make any sense as the "." is not a glob character and does not
need to be quoted, leaving the "*" unprotected and vulnerable to shell
expansion if there happened to be a matching filename in the current
directory (although that typically results in syntax errors from find.) 
This could explain why it happens to work from the command line but not
in cron, but it's kind of a long shot.  I don't see any other common
cron problems (D is not a network drive and your mounts are
system-mode.)  In any case I would fix the quoting, regardless of other
issues.

Brian



=

Rubicon Fund Management LLP is Authorised and Regulated by the Financial 
Services Authority.
Telephone: 44(0) 20 7074 4200
Fax:   44(0) 20 7074 4299

Registered in England: Partnership No OC300480 Registered Office:  42-46 High 
Street, Esher, Surrey  KT10 9QY

Important Notice:
This message is for the named recipient(s) use only.  It may contain 
confidential, proprietary, or legally privileged information.  No 
confidentiality or privilege is waived or lost by any mistransmission.  If you 
have received this message by error, please immediately notify the sender, 
delete it and all copies of it from your system, destroy any hard copies, and 
notify [EMAIL PROTECTED]  If you are not the intended recipient, you must not 
use, disclose, distribute, print, or copy any part of this message directly or 
indirectly.


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



Perl output dropped when invoking itself

2006-11-14 Thread Michael Adler
I'm having Perl I/O problems on one machine that keep me from getting 
CPAN installations to work.  On this machine if I execte:


   perl -e 'print `perl -e "require 5; print qq{VER_OK\n}"`;'

from bash there is no output.  On all my other machines it prints 
VER_OK.  ExtUtils::MM_Unix does this test and fails.


I've looked at all environment variables I can think of, especially 
CYGWIN, and it is identical on a machine that works and one that fails.  
Cygwin is up to date on both and Perl version is 5.8.7.  I've tried 
multiple values of the PERLIO variable with no success.  Replacing the 
inner invocation of perl with some other command, like cat of a file, 
works on both machines!  I tried blowing away the entire perl 
environment and reinstalling. 


I assume I'm missing something simple.  Hints would be appreciated.

Thank you,
-Michael


--
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: The newer version of Bash (Maybe after 3.1.6) brings something wrong for the executive operator `(backquote) in Makefile

2006-11-14 Thread Dave Korn
On 14 November 2006 07:40, Zhenghui Zhou wrote:

> When execute makefile through make command, any compile line contains
> the executive operator `(backquote), likes `pkg-config --cflags
> gtk+-2.0`, would result in a compile error, reported by gcc/g++, which
> said ": No such file or directory".
> 
> Any advice would be appreciated.

  Pipe it through d2u.

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: The newer version of Bash (Maybe after 3.1.6) brings something wrong for the executive operator `(backquote) in Makefile

2006-11-14 Thread Zhenghui Zhou

Also, I would applogized here thar for submit questions without
reading the release annoucement first.

I reply it for any latter reference.

Regards,
Zhenghui Zhou


2006/11/14, Zhenghui Zhou <[EMAIL PROTECTED]>:

Thanks,
Zhenghui Zhou

2006/11/14, Dave Korn <[EMAIL PROTECTED]>:
> On 14 November 2006 07:40, Zhenghui Zhou wrote:
>
> > When execute makefile through make command, any compile line contains
> > the executive operator `(backquote), likes `pkg-config --cflags
> > gtk+-2.0`, would result in a compile error, reported by gcc/g++, which
> > said ": No such file or directory".
> >
> > Any advice would be appreciated.
>
>  Pipe it through d2u.
>
>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/
>
>



--
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: [Fwd: Re: ld: cannot perform PE operations on not PE files ...]

2006-11-14 Thread Salvatore D'Angelo

Dave you're right. I forgot to add -r.
Thanks a lot. Your solution work fine.

The problem now is that I should change the Makefile in order to have 
two different behaviour in CYGWIN and linux.


The solutions are:

1. use if statements in order to execute different statements on linux 
and cygwin. The question now is how I can do that. I mean what is the 
variable I have to check with ifdef?
2. Install binutils cross and set target i686-pc-linux. In this way I 
have to change only the name of tools used to compile and link. But I do 
not know how to do that. Could someone suggest me a link?


PS
please cc my address since I am not subscribed at the list

Dave Korn ha scritto:


On 14 November 2006 13:28, Salvatore D'Angelo wrote:

 


sorry  forgot to mention to put my address in cc since I am not
subscribed to the list
   



 Sorry, I forgot and only answered the list!

   cheers,
 DaveK
 





Oggetto:
RE: ld: cannot perform PE operations on not PE files ...
Da:
"Dave Korn" <[EMAIL PROTECTED]>
Data:
Tue, 14 Nov 2006 10:13:10 -
A:


A:



On 14 November 2006 09:58, Salvatore D'Angelo wrote:


 


In the Dave solution I noticed the size of final image is 528 instead of
512 (the size of the bootsector) as in Linux. Why?
   



 Seems like your bootsect.out ended up containing __CTOR_LIST__ and
__DTOR_LIST__.  Are you /absolutely/ sure you remembered to give the '-r'
option to ld?

   cheers,
 DaveK
 





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



bash does not retain env when running script

2006-11-14 Thread Arto Stimms
I am running cygwin on a Windows 2000 machine.

I would like to run a bash script with a few changes in the environment. I 
would expect this to work:

bash --rcfile init.sh script

But it does not seem that bash retain any of the changes I have made in init.sh?

As a small example I have tried using these two minimal files

init.sh:
hello () { echo "hello world"; }
alias listdir=ls

script:
hello
listdir

I get the following output:

$ bash --rcfile init.sh script
script: line 1: hello: command not found
script: line 2: listdir: command not found

$ bash --rcfile init.sh

$ hello
hello world

$ listdir
init.sh  script

$ ./script
./script: line 1: hello: command not found
./script: line 2: listdir: command not found

What can I do to make my changes work in the script?

Best Regards,
  Arto Stimms





--
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: "/bin/bash: Permission denied" with ssh to localhost under WinXP 2003 x64?

2006-11-14 Thread Dave Korn
On 14 November 2006 18:30, Brian Kasper wrote:

> Here's the text of my most recent login attempt:
> 
>  >kasper 509 $ ssh localhost
>  >[EMAIL PROTECTED]'s password:
>  >Warning: No xauth data; using fake authentication data for X11
>  >forwarding.
>  >Last login: Tue Nov 14 10:00:34 2006 from 127.0.0.1
>  >Fanfare!!!
>  >You are successfully logged in to this server!!!
>  >/bin/bash: Permission denied
>  >Connection to localhost closed.

> working correctly.  The permissions on c:/cygwin/bin/bash.exe are ugo+rwx:
> 
> -rwxrwxrwx 1 kasper Users 467968 Nov  2 19:22 /bin/bash.exe
> 
> and I've given "full control" permission to "Everyone", "kasper", and
> "sshd_server" for the entire c:/cygwin directory tree.

> I'd really appreciate any pointers anyone can offer.

  Try replacing '/bin/bash' with /bin/id -a' in your /etc/passwd, and let's
see who cygwin thinks you are when you log in.  Then we can get into looking
at ACLs.

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: bash does not retain env when running script

2006-11-14 Thread Matthew Woehlke

Arto Stimms wrote:

I would like to run a bash script with a few changes in the environment. I 
would expect this to work:
[snip]
As a small example I have tried using these two minimal files

init.sh:
hello () { echo "hello world"; }
alias listdir=ls

script:
hello
listdir

I get the following output:

$ bash --rcfile init.sh script
script: line 1: hello: command not found
script: line 2: listdir: command not found

What can I do to make my changes work in the script?


'script' is being run in a subshell, and you cannot export aliases to a 
subshell (but there are things you can do to get an rc file to run for a 
subshell; read 'man bash'). For the function, try 'export'ing it.


None of this has anything to do with Cygwin.

--
Matthew
Not to be used as a flotation device.


--
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: "/bin/bash: Permission denied" with ssh to localhost under WinXP 2003 x64?

2006-11-14 Thread Brian Kasper
If I set my shell to "/bin/id -a" in /etc/passwd, I'm never able to log 
in successfully (I'm sure I typed my password correctly):


C:\cygwin\etc>ssh localhost
[EMAIL PROTECTED]'s password:
Permission denied, please try again.
[EMAIL PROTECTED]'s password:

If I set my shell to "/bin/id", I see this:

C:\cygwin\etc>ssh localhost
[EMAIL PROTECTED]'s password:
Last login: Tue Nov 14 12:09:47 2006 from 127.0.0.1
Fanfare!!!
You are successfully logged in to this server!!!
/bin/id: Permission denied
Connection to localhost closed.

I get "Permission denied" for /bin/sh as well, so it appears that I 
can't execute anything in the /bin directory when I try to connect with ssh.


Thanks for the suggestion.  I'm pretty much out of ideas at this point. 
 I've been using a Win2K system until recently, and I'm finding the 
whole issue of permissions in WinXP problematic.


Any other thoughts?

-B

Dave Korn wrote:

On 14 November 2006 18:30, Brian Kasper wrote:


Here's the text of my most recent login attempt:

 >kasper 509 $ ssh localhost
 >[EMAIL PROTECTED]'s password:
 >Warning: No xauth data; using fake authentication data for X11
 >forwarding.
 >Last login: Tue Nov 14 10:00:34 2006 from 127.0.0.1
 >Fanfare!!!
 >You are successfully logged in to this server!!!
 >/bin/bash: Permission denied
 >Connection to localhost closed.



working correctly.  The permissions on c:/cygwin/bin/bash.exe are ugo+rwx:

-rwxrwxrwx 1 kasper Users 467968 Nov  2 19:22 /bin/bash.exe

and I've given "full control" permission to "Everyone", "kasper", and
"sshd_server" for the entire c:/cygwin directory tree.



I'd really appreciate any pointers anyone can offer.


  Try replacing '/bin/bash' with /bin/id -a' in your /etc/passwd, and let's
see who cygwin thinks you are when you log in.  Then we can get into looking
at ACLs.

cheers,
  DaveK



--
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: Xemacs print problem

2006-11-14 Thread Dave Korn
On 14 November 2006 20:06, Eric Monsler wrote:

> All,
> 
> I have installed the xemacs as part of the cygwin setup.
> 
> When trying to print from within xemacs, xemacs crashes and fails.
> This occurs either when selecting File->Print... or File->Page Setup.
> The full xemacs output is below.
> 
> I have the Windows-native XEmacs installed, which has no such problem.
> 
> I have the printer set, and lpr directs appropriately.
> $ echo $PRINTER
> \\serveracct\laser_kitchen_ps


  Ah, there's the problem, you've printed to your kitchen instead of the
printer.  Check the toaster for your output!


  ;) SCNRIKISHTITTTLDI!


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/



Paypal to e-gold, StormPay to e-gold, Moneybookers - fees 5-10%

2006-11-14 Thread PayExchange
Exchange Service from Paypal to e-gold, from StormPay to e-gold, from 
Moneybookers to e-gold


SERVICE FEES:
PayPal to E-Gold: 5% - 10%
StormPay to E-Gold: 5% - 10%
Moneybookers to E-Gold: 4%-7%

PayExchange.net

www.PayExchange.net 



--
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: "Bash Here..." menu option "howto" reg-entry

2006-11-14 Thread Linda Walsh



Frank Fesevur wrote:

Linda Walsh wrote:

Yes...it requires installing a separate executable program.

This "add bash prompt" requires no 3rd party binary and
uses programs already included in the cygwin base package.

The installable program also has a bug in that it invokes each
shell window as a separate user login, breaking the normal
windowing paradigm of one login (starting an X-server, for
example), followed by multiple client windows (that don't get
started as login windows).


The maintainer of chere reads this list, so I think he will respond.


Why install extra programs when it can all be done by adding
2 registry keys (1 for directories, 1 for drives)?


The answer is very simple to me. Because you can configure it much 
better and easier. Why should I *manually* edit a .reg file to change 
the paths? I don't like to have cygwin installed in c:\ as you 
apparently have. That is handled by chere for you.


Regards,
Frank


   True, I thought I mentioned the installation in root requirement.

   Basically, if you want *nix utils to *inter-operate*, cleanly,
on windows and *nix files, they, ideally, should have a consistent
path structure in and out of cygwin.  I wanted the *nix tools as
an addition to my win environment, not as a separate world -- if I
want that, I might as well use linux (or use a VM running linux).
I want the *nix tools to make my life easier on Windows.  I can use
*nix tools, largely, to manage my system.  I'm using cygwin as an
integration tool -- not for the purpose of having a 2nd, separate
environment.

   Along the same lines, my Windows home directories are all under
"/Home".  (not an easy process & best done when first setting up the
system).

My *nix and Win worlds share /home -- no conflicts, no problems in 5+ 
years,

same with cygwin root at "/".

Definitely different strokes for different folks...:-)





--
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 Environment from ThumbDrive

2006-11-14 Thread Bodger

How possible would it be to:

1) Install a Cygwin environment into a Thumbdrive, including /home, /usr
etc.
2) With the help of some crafty shell scripts, be available from most
Windows boxes by plugging the thumb drive in and running the environment
from there?

Thanx

Julian
-- 
View this message in context: 
http://www.nabble.com/Cygwin-Environment-from-ThumbDrive-tf2632605.html#a7347684
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: cygwin-1.5.22-1 -> cygwin1.dll.new, not cygwin1.dll

2006-11-14 Thread Larry Hall (Cygwin)

Lester Ingber wrote:

I just used setup.exe to upgrade to cygwin-1.5.22-1.  I rebooted, and I
got a error that cygwin1.dll could not be found.  Under Windows Explorer
I saw /bin/cygwin1.dll.new (no other cygwin1.dll[.] file), so I renamed
it to cygwin1.dll, and now everything seems to be working OK.

Is the postinstall broken?




I don't think so:

> 1828k 2006/11/13 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0

cygwin   1.5.22-1


Your cygcheck output shows it exactly where it should be.  Also,
 shows no sign of a
missing cygwin1.dll or a cygwin1.dll.new.  Looks like a local problem
to me.

Am I seeing double or did you send two of these messages?

--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (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/



Cygwin util replacing win-util for UCS-2 -> UTF-8; utf8 support (redux)

2006-11-14 Thread Linda Walsh

Right now, to convert an NT text file in UCS-2 format, in bash,
I use:

mode.com codepage select=65001
reg export hklm\\software hklm-sw.reg5
cmd /c type hklm-sw.reg5  > hklm-sw-utf8.txt

It isn't perfect -- any UCS-2 entries that are not valid UTF-16
won't get converted properly (since they don't represent a valid
text string).

You can convert to other codepages, of course, by selecting
an alternate code page with "mode".

What ever happened to the UTF-8 compatibility layer that
someone wrote a patch for a while back?  I don't recall seeing
the issue discussed on the list.  I heard mention that it might
have been on another list, but it seems as a cygwin issue, it
might have gotten more people interested in the discussion had it
been discussed here.

It's troublesome to have filenames that are valid under
windows be inaccessible with cygwin utils (like rsync).
It's a pain that I can't rsync my music directory (which
contains World-beat music) to my mp3 player without getting
multiple "file not found" errors. (due to rsync not
understanding International filenames).

Can't even "ls" in some directories:

/m/World/Omar/Süleyan the Magnificient> ll -gG
ls: 01 Istanbul'dan Görüntüler.mp3: No such file or directory
ls: 17 Istanbul'dan Görüntüler (Reprise).mp3: No such file or directory
ls: 10 Süleyman?n Öyküsü.mp3: No such file or directory
ls: 02 Gögü Yedi Kat?.mp3: No such file or directory
ls: 08 Topkap?n?n Bahçesi.mp3: No such file or directory
ls: 11 Teke Z?plamas?.mp3: No such file or directory
ls: 13 Segâh Pesrev.mp3: No such file or directory
ls: 15 Hicaz Pesrev.mp3: No such file or directory
ls: 05 Ussak Semai.mp3: No such file or directory
total 23088
-rw-r- 1 2447657 Mar  8  2003 03 Egeli Gemici.mp3
-rw-r- 1 3253625 Mar  8  2003 04 Aya Sofya.mp3
-rw-r- 1 1311799 Mar  8  2003 06 Nihâvend Fantazi.mp3
-rw-r- 1 1733289 Mar  8  2003 07 Kuzeydeki Köy.mp3
-rw-r- 1 6059476 Mar  8  2003 09 Rast Medhal.mp3
-rw-r- 1 3791275 Mar  8  2003 12 Mevlânâ.mp3
-rw-r- 1 1371208 Mar  8  2003 14 Hicaz Taksimi.mp3
-rw-r- 1 3654052 Mar  8  2003 16 Makber.mp3
/m/World/Omar/Süleyan the Magnificient>


--
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 Environment from ThumbDrive

2006-11-14 Thread Larry Hall (Cygwin)

Bodger wrote:

How possible would it be to:

1) Install a Cygwin environment into a Thumbdrive, including /home, /usr
etc.
2) With the help of some crafty shell scripts, be available from most
Windows boxes by plugging the thumb drive in and running the environment
from there?



Google much?



--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (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: Cygwin util replacing win-util for UCS-2 -> UTF-8; utf8 support (redux)

2006-11-14 Thread Brian Dessent
Linda Walsh wrote:

> Right now, to convert an NT text file in UCS-2 format, in bash,
> I use:
> 
> mode.com codepage select=65001
> reg export hklm\\software hklm-sw.reg5
> cmd /c type hklm-sw.reg5  > hklm-sw-utf8.txt

Yuck.  Why don't you just use iconv instead?

> What ever happened to the UTF-8 compatibility layer that
> someone wrote a patch for a while back?  I don't recall seeing
> the issue discussed on the list.  I heard mention that it might
> have been on another list, but it seems as a cygwin issue, it
> might have gotten more people interested in the discussion had it
> been discussed here.



> It's troublesome to have filenames that are valid under
> windows be inaccessible with cygwin utils (like rsync).
> It's a pain that I can't rsync my music directory (which
> contains World-beat music) to my mp3 player without getting
> multiple "file not found" errors. (due to rsync not
> understanding International filenames).

This is unfortunate, I agree, but the problem is that switching
everything to the wide-character version of the win32 APIs is a
significant undertaking, as you can read in the above thread.

Brian

--
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.22-1 -> cygwin1.dll.new, not cygwin1.dll

2006-11-14 Thread Matthew Woehlke

Larry Hall (Cygwin) wrote:

Lester Ingber wrote:

I just used setup.exe to upgrade to cygwin-1.5.22-1.  I rebooted, and I
got a error that cygwin1.dll could not be found.  Under Windows Explorer
I saw /bin/cygwin1.dll.new (no other cygwin1.dll[.] file), so I renamed
it to cygwin1.dll, and now everything seems to be working OK.

Is the postinstall broken?


Am I seeing double or did you send two of these messages?


You're seeing double. The first forgot the cygcheck output. :-)

--
Matthew
Not to be used as a flotation device.


--
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 util replacing win-util for UCS-2 -> UTF-8; utf8 support (redux)

2006-11-14 Thread Christopher Faylor
On Tue, Nov 14, 2006 at 02:58:15PM -0800, Brian Dessent wrote:
>Linda Walsh wrote:
>>Right now, to convert an NT text file in UCS-2 format, in bash, I use:
>>
>>mode.com codepage select=65001 reg export hklm\\software hklm-sw.reg5
>>cmd /c type hklm-sw.reg5 > hklm-sw-utf8.txt
>
>Yuck.  Why don't you just use iconv instead?
>
>>What ever happened to the UTF-8 compatibility layer that someone wrote
>>a patch for a while back?  I don't recall seeing the issue discussed on
>>the list.  I heard mention that it might have been on another list, but
>>it seems as a cygwin issue, it might have gotten more people interested
>>in the discussion had it been discussed here.
>
>

And, it has been mentioned here at least twice.  This is the most recent
case:

http://cygwin.com/ml/cygwin/2006-10/msg01071.html

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: cygwin-1.5.22-1 -> cygwin1.dll.new, not cygwin1.dll

2006-11-14 Thread Lester Ingber
Larry:

I couldn't use Cygwin to send an email until after I remamed
cygwin1.dll.new; otherwise cygcheck would not have registered any
cygwin1.dll.

Yes, as the poster after you in this thread noticed, I forgot to add
the cygcheck.out in the first email, so I quickly resent it with the
attachment.

Thanks.

Lester

  +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=

Lester Ingber wrote:

I just used setup.exe to upgrade to cygwin-1.5.22-1.  I rebooted, and I
got a error that cygwin1.dll could not be found.  Under Windows Explorer
I saw /bin/cygwin1.dll.new (no other cygwin1.dll[.] file), so I renamed
it to cygwin1.dll, and now everything seems to be working OK.


Is the postinstall broken?



I don't think so:

> 1828k 2006/11/13 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0

cygwin 1.5.22-1 


Your cygcheck output shows it exactly where it should be.  Also,
 shows no sign of a
missing cygwin1.dll or a cygwin1.dll.new.  Looks like a local problem
to me.


Am I seeing double or did you send two of these messages?

--
Larry Hall


--
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.22-1 -> cygwin1.dll.new, not cygwin1.dll

2006-11-14 Thread Larry Hall (Cygwin)

Lester Ingber wrote:

Larry:

I couldn't use Cygwin to send an email until after I remamed
cygwin1.dll.new; otherwise cygcheck would not have registered any
cygwin1.dll.



Sounds to me like you had cygwin1.dll loaded by some Cygwin app
while you were installing and that you didn't reboot as requested
afterwards.


--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (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/



Cygwin gdb and signals

2006-11-14 Thread Gordon Prieur

Hi,

   I've got several questions relating to gdb (as distribited by 
Cygwin.com) for Windows.
I'm the team lead for the NetBeans C/C++ Developer pack (C/C++ support 
on NetBeans).
We're doing a gdb-based debug module and I've got some questions 
pertaining to signal

handling and the exception stack we get when we interrupt the debuggee.

   First off, when my signal is received, gdb stops and the stack looks 
like its some kind
of exception stack (no user calls). Is there anyway to see the user 
stack while stopped
in this exception/signal stack? My concern is that most of my users 
won't understand why
they see a stack trace without any of their calls in it. A combined 
stack (with some kind
of separator) would be more beneficial to novice users. If the regular 
stack is available,

I can tack them together and deliver this to my users.

   The other question is about input being reentrant. On Unix, if I 
interrupt a system call
(specificaly a read), when I resume its after the syscall. What I'm 
getting (its mostly an
issue for interrupted input) is the read is resumed and the program 
continues to be
blocked. Since the user can't (at least with my current understanding of 
gdb and cygwin)
see their data, it basically means the interrupt is useless (they can't 
see their stack, see
their data, or modify their environment in any useful way). And after 
continuing (step
or continue) they're still blocked waiting for input. At least to me (a 
long-time Unix

developer), this is very counter intuitive.

   Any help on either stack manipulation or making syscalls 
non-reentrant would be
appreciated. My current plan is to show the user this exception stack 
(which they'll
think is a bug) and resume execution with the blocked input (which 
they'll also think

is a bug:-).

Thanks,
Gordon


--
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 gdb and signals

2006-11-14 Thread Christopher Faylor
On Tue, Nov 14, 2006 at 07:19:21PM -0800, Gordon Prieur wrote:
>Hi,
>
>I've got several questions relating to gdb (as distribited by
>Cygwin.com) for Windows.  I'm the team lead for the NetBeans C/C++
>Developer pack (C/C++ support on NetBeans).  We're doing a gdb-based
>debug module and I've got some questions pertaining to signal handling
>and the exception stack we get when we interrupt the debuggee.
>
>First off, when my signal is received, gdb stops and the stack looks
>like its some kind of exception stack (no user calls).  Is there anyway
>to see the user stack while stopped in this exception/signal stack?  My
>concern is that most of my users won't understand why they see a stack
>trace without any of their calls in it.  A combined stack (with some
>kind of separator) would be more beneficial to novice users.  If the
>regular stack is available, I can tack them together and deliver this
>to my users.
>
>The other question is about input being reentrant.  On Unix, if I
>interrupt a system call (specificaly a read), when I resume its after
>the syscall.  What I'm getting (its mostly an issue for interrupted
>input) is the read is resumed and the program continues to be blocked.
>Since the user can't (at least with my current understanding of gdb and
>cygwin) see their data, it basically means the interrupt is useless
>(they can't see their stack, see their data, or modify their
>environment in any useful way).  And after continuing (step or
>continue) they're still blocked waiting for input.  At least to me (a
>long-time Unix developer), this is very counter intuitive.
>
>Any help on either stack manipulation or making syscalls non-reentrant
>would be appreciated.  My current plan is to show the user this
>exception stack (which they'll think is a bug) and resume execution
>with the blocked input (which they'll also think is a bug:-).

Cygwin's gdb doesn't really understand Cygwin signals that well.  I added
some prelimary code a while ago but it is not anywhere close to being as
functional as linux.

If you receive a Windows signal, you are likely to be in another thread
since Windows starts a separate thread to deal with signals like CTRL-C
and, so, the stack frame will reflect that.  If the main thread is
blocked in a Windows system call then you won't get much information
from the backtrace because Windows doesn't store stack frames.  If the
main thread is blocking in a Cygwin function (which is unlikely since
the only way Cygwin can really block is in a Windows function) then the
stack frames will not be correct in most cases since Cygwin messes with
the stack to handle its own signals.

So, sorry to say that the situation with gdb/cygwin/signals is really not
very useful.

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: Excessive thrashing when popen()ing after a large malloc()

2006-11-14 Thread Linda Walsh

I tried your program as is:

~/test> cygthrash
 0.000 Before std
 0.781 After std
 0.828 Result: Tue Nov 14 20:51:52 PST 2006
 0.828 After close std
 0.000 Before new
 0.015 After new
 0.062 Result: Tue Nov 14 20:51:52 PST 2006
 0.062 After close new
 0.000 Before std
 0.766 After std
 0.797 Result: Tue Nov 14 20:51:53 PST 2006
 0.797 After close std

(no thrash) and with 750Mb malloc:

~/test> cygthrash
 0.000 Before std
 0.015 After std
 0.046 Result: Tue Nov 14 20:53:41 PST 2006
 0.046 After close std
 0.000 Before new
 0.000 After new
 0.032 Result: Tue Nov 14 20:53:41 PST 2006
 0.032 After close new
 0.000 Before std
 0.015 After std
 0.047 Result: Tue Nov 14 20:53:41 PST 2006
 0.047 After close std

at 1G malloc, I started running out of memory

Loic Grenie wrote:

On Tue Nov 14 15:53:36 2006, Eric Blake ([EMAIL PROTECTED] ) wrote:
  

And admitting that your changes are untested is not a good sign for
getting it approved.


I'm not really "admitting", I am just expliciting that the patch is
  untested. I do not have the resources to build the thing.

  Sorry to have disturbed, happy cygwining,
  

Guess you didn't know that all posters are automatically on trial here to
defend their ideas and posts.  Some can't help but take the role of
prosecutor & detective (too much CSI maybe?) :-).

-linda


--
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 util replacing win-util for UCS-2 -> UTF-8; utf8 support (redux)

2006-11-14 Thread Linda Walsh

Brian Dessent wrote:

Yuck.  Why don't you just use iconv instead?
  

Cuz, I thought it was only a library? :-?

Cuz I already know windows starts in UCS-2 and know the codepage
for UTF-8 (65001).  With iconv, I don't know off the top of my head
where to look for what document that specifies the strings to use
for input and output.  Output is likely utf-8 or utf8, but it might
require uppercase.  I don't think UCS-2 is a unicode input charset,
so I'd have to semi-lie to iconv and tell it utf16, but that's no
worse than the windows method, where the "lie" is implicit.

But thanks for the new pointer... something else to learn & use...


linda


--
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: [ANNOUNCEMENT] Updated: bash-3.2.3-5

2006-11-14 Thread SungHyun Nam

Hello,

I cannot use /dev/stdout with a bash-3.2.3-5.
For example, 'echo hi >/dev/stdout' failed.
It works fine after I reverted to bash-3.1-6.

Thanks.
namsh





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



[patch] cygport, find ... -exec

2006-11-14 Thread Charles Wilson
Usually, the 'find ... -exec cmd ...' idiom makes a lot of sense -- it's 
faster, one fewer forks (maybe MANY fewer), etc.


However, you sometimes run into troubles with extremely long filelists. 
As I did with ncurses (1183 files in the build/ directory) -- and I got 
a 'too many files' error from touch resulting from this command in 
__prepinstalldirs:


find ${B} -type f -exec touch -t $(date +%Y%m%d%H%M.%S) '{}' +;


The attached patch reverts to using -print0 | xargs -0 instead of -exec.

--
Chuck
Index: bin/cygport.in
===
RCS file: /cvsroot/cygwin-ports/cygport/bin/cygport.in,v
retrieving revision 1.29
diff -u -r1.29 cygport.in
--- bin/cygport.in  30 Oct 2006 06:09:47 -  1.29
+++ bin/cygport.in  15 Nov 2006 07:28:09 -
@@ -873,7 +873,7 @@
 
# circumvent pointless libtool relinking during install
find ${B} -name '*.la' -exec sed -i -e 's!^relink_command=.*!!' '{}' +;
-   find ${B} -type f -exec touch -t $(date +%Y%m%d%H%M.%S) '{}' +;
+   find ${B} -type f -print0 | xargs -0 touch -t $(date +%Y%m%d%H%M.%S)
 }
 
 # run 'make install'

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