Re: Usage Of Cron and AT commands

2006-08-22 Thread sujit . menon
Hi Mr. mwoehlke,

I have read the replies to my previous post and that is the very reason I
am rewriting this mail,
the previous mailer by Mr. chuck had just mentioned using "man crontab",
which is not what I want.
I am not using crontab and am using cron and at for batch processing  I
want to know where to
add the permissions for allowing cron jobs...

The previous mail has not solved my problem..

Warm Regards,
Sujit Chandran Menon
Tata Consultancy Services Limited
INDIA




   
 mwoehlke  
 <[EMAIL PROTECTED] 
 om>To 
   
 08/22/2006 09:31   cc 
 PM[EMAIL PROTECTED] 
   Subject 
   Re: Usage Of Cron and AT commands   
   
   
   
   
   
   




[EMAIL PROTECTED] wrote (again):
>   Hi CygWinners,
>   I would like to know the syntax of crontab, cron and at commands for
>   its use in task scheduling.
> [snip]

Please read the replies to your first post instead of posting again.

And please lose the obnoxiously long signature and unenforceable
disclaimer. Everything below your name is superfluous, and quoting your
e-mail address is inviting spam (similarly, you should set your 'to' to
display your name instead of your e-mail address).

--
Matthew
'$ time make world' -> real 5d:14h:37m:5.291s  user 0m:0.000s  sys
4d:2h:14m:43.712s

ForwardSourceID:NT304E
=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



--
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: Installation from hardisk, is it possible?

2006-08-22 Thread steven woody

On 8/22/06, Mike Fahlbusch <[EMAIL PROTECTED]> wrote:

steven woody wrote:
> hi,
>
> i am going to install a copy of cygwin in my notebook, but for some
> reasons the computer can not access internet, so i think i have to
> download a full suites of installation files on to my desktop computer
> and then transfer them to the notebook before i can install from
> there. is it possible and how?  thanks.

Because my old Pentium W98SE computer doesn't have enough hard disk
space to hold the cygwin setup files, I do it this way:

- download the latest cygwin setup file to your desktop computer.  (I've
tried installing cygwin over the network.  Although setup can see the
remote folder, it won't accept a pathname that doesn't start with a
drive letter.)
- use it to download the cygwin files to your HD in its own folder
(cygwin setup.exe gives the choice of downloading files to HD,
installing cygwin from the Internet or installing cygwin from HD)
- burn the cygwin folder to CD or preferably DVD, whatever your laptop
has (there is apparently over 1 Gb of cygwin files.  However if you
download the default cygwin files it should fit on a CD.)
- make sure the setup.exe file is on the CD
- put the cygwin CD in the laptop and copy the setup file only to its
own folder on the HD
- you should now be able to run the setup program off the laptop HD,
point it at the CD cygwin folder and install cygwin as per usual
- presumably this would also work with a large USB memory stick, but I
can't try it.


good idea. thank you!




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





--
woody

then sun rose thinly from the sea and the old man could see the other
boats, low on the water and well in toward the shore, spread out
across the current.

--
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: A build problem of C++ code on Cygwin

2006-08-22 Thread Gary R. Van Sickle
> From: Brian Dessent
> Sent: Tuesday, August 22, 2006 6:30 PM
> Subject: Re: A build problem of C++ code on Cygwin
> 
> Brian Dessent wrote:
> 
> > I've seen this a million times.  It's a makefile that doesn't know 
> > about $EXEEXT and assumes that executables have no 
> extension.  Because 
> > of this one of the stock built-in make rules gets invoked 
> instead of 
> > the proper link command.  Look in the Makefile for the rule that 
> > generates the final binary and I'm willing to bet that it has no 
> > $EXEEXT.  This works fine on linux because there is no 
> extension for executables there.
> 
> Indeed.  The attached patch (and then re-running automake at the
> top-level) causes the build to work correctly -- or at least 
> get past the problem you reported, I don't feel like waiting 
> for the full build.
> 
> You should report this upstream.  The change should be safe 
> for any platform.
> 
> Brian

Another very similar one to watch out for are makefiles that actually do
support $EXEEXT, but for whatever reason $EXEEXT gets set to nothing.  I
think it's mainly hand-rolled makefiles these days, but IIRC if somebody's
using crusty enough autotools they'll get configures that do this to you.

-- 
Gary R. Van Sickle
 


--
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: A build problem of C++ code on Cygwin

2006-08-22 Thread Angelo Graziosi

Brian Dessent wrote


> Indeed.  The attached patch (and then re-running automake at the
> top-level) causes the build to work correctly -- or at least get past
> the problem you reported, I don't feel like waiting for the full build.
 
Hi Brian,

many thanks for the patch, I have sent it to LiDIA Group.


Cheers,

  Angelo.


--
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 cygwin from file server

2006-08-22 Thread Igor Peshansky
On Tue, 22 Aug 2006, Richard Foulk wrote:

> Aloha,
>
> I've installed Cygwin on a file server common to a large number of
> clients.  This allows various tools and scripts to be run on any
> of the clients without cluttering them with their own installations.
>
> Occasionally it would be nice to obtain a quick interactive shell
> environment on one of the clients, including having /tmp, /etc and
> others in place on the server partition.  Preferrably without leaving
> a lasting trace on the client.  Perhaps by invoking a single batch file
> from the server partition.
>
> Is there a quick, easy, or already done, way of doing this?

Something like this is quick, dirty, and ought to do it:

@echo off
set SCRIPT_DIR=%~dp0
REM Set up mounts
%SCRIPT_DIR%bin\mount -u "%SCRIPT_DIR%" /
%SCRIPT_DIR%bin\mount -u "%SCRIPT_DIR%bin" /usr/bin
%SCRIPT_DIR%bin\mount -u "%SCRIPT_DIR%lib" /usr/lib
REM Start the Cygwin shell
call %SCRIPT_DIR%cygwin.bat
REM Clean up mounts
%SCRIPT_DIR%bin\umount -uA

(put it in your Cygwin root on the file server, won't work on Win9x/ME).

Note that this will trash the user mounts in your existing Cygwin
environment on the client (if there is one).  Detecting existing Cygwin
user mounts using the mount command is left as an exercise for the reader.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_Igor Peshansky, Ph.D. (name changed!)
 |,4-  ) )-,_. ,\ (  `'-'   old name: Igor Pechtchanski
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

--
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: write() or read() returning ENOENT status

2006-08-22 Thread Christopher Faylor
On Tue, Aug 22, 2006 at 07:03:06PM -0500, Loh, Joe wrote:
>Can anyone tell us what Windows error status gets mapped as ENOENT
>return status for wite() or read() system calls?  We have a test
>program that runs for hours, sometimes days doing constant I/O to an
>iSCSI volume and sporadically we will get an ENOENT return status from
>either the write() or read() system calls.

  % grep ENOENT errno.cc
X (BAD_PATHNAME,  ENOENT),
X (FILE_NOT_FOUND,ENOENT),
X (INVALID_NAME,  ENOENT),
X (MOD_NOT_FOUND, ENOENT),
X (PATH_NOT_FOUND,ENOENT),
  /* ENOENT 2 */"No such file or directory",

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: running cygwin from file server

2006-08-22 Thread Christopher Faylor
On Tue, Aug 22, 2006 at 01:49:43PM -1000, Richard Foulk wrote:
>Aloha,
>
>I've installed Cygwin on a file server common to a large number of
>clients.  This allows various tools and scripts to be run on any
>of the clients without cluttering them with their own installations.
>
>Occasionally it would be nice to obtain a quick interactive shell
>environment on one of the clients, including having /tmp, /etc and
>others in place on the server partition.  Preferrably without leaving
>a lasting trace on the client.  Perhaps by invoking a single batch file
>from the server partition.
>
>Is there a quick, easy, or already done, way of doing this?

You could just write a .bat file which used the "mount" command
to point /tmp and / to appropriate places, run bash, and then
umount those settings after bash was run, e.g.:

  mount -u -f -b c:\windows\temp /tmp
  mount -u -f -b \\file\server\cygwin /
  bash
  umount -u /tmp
  umount -u /

It actually would be possible, without too much work, to make a
"transient" type of mount which would not show up in the registry but
only exists as long as a user is using cygwin.  I might discuss this
with Corinna to see if that's something worth pursuing.
--
Christopher Faylor  spammer? -> [EMAIL PROTECTED]
Cygwin Co-Project Leader[EMAIL PROTECTED]
TimeSys, Inc.

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



write() or read() returning ENOENT status

2006-08-22 Thread Loh, Joe

Can anyone tell us what Windows error status gets mapped as ENOENT
return status for wite() or read() system calls?  We have a test program
that runs for hours, sometimes days doing constant I/O to an iSCSI
volume and sporadically we will get an ENOENT return status from either
the write() or read() system calls. 

Thank you in advance.

Joe

--
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 cygwin from file server

2006-08-22 Thread Richard Foulk
Aloha,

I've installed Cygwin on a file server common to a large number of
clients.  This allows various tools and scripts to be run on any
of the clients without cluttering them with their own installations.

Occasionally it would be nice to obtain a quick interactive shell
environment on one of the clients, including having /tmp, /etc and
others in place on the server partition.  Preferrably without leaving
a lasting trace on the client.  Perhaps by invoking a single batch file
from the server partition.

Is there a quick, easy, or already done, way of doing this?


Thanks

Richard

--
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: A build problem of C++ code on Cygwin

2006-08-22 Thread Brian Dessent
Brian Dessent wrote:

> I've seen this a million times.  It's a makefile that doesn't know about
> $EXEEXT and assumes that executables have no extension.  Because of this
> one of the stock built-in make rules gets invoked instead of the proper
> link command.  Look in the Makefile for the rule that generates the
> final binary and I'm willing to bet that it has no $EXEEXT.  This works
> fine on linux because there is no extension for executables there.

Indeed.  The attached patch (and then re-running automake at the
top-level) causes the build to work correctly -- or at least get past
the problem you reported, I don't feel like waiting for the full build.

You should report this upstream.  The change should be safe for any
platform.

Brian--- library/base/Makefile.am.orig   2006-03-06 04:22:06.0 -0800
+++ library/base/Makefile.am2006-08-22 16:17:54.93750 -0700
@@ -396,7 +396,7 @@ CLEANFILES = $(LIDIA_CONFIG_INCLUDEDIR)/
 
 noinst_HEADERS = $(LIDIA_CONFIG_INCLUDEDIR)/bytes_to_int_flag.h
 
-$(LIDIA_CONFIG_INCLUDEDIR)/bytes_to_int_flag.h: bytes_to_int_flag_generator
+$(LIDIA_CONFIG_INCLUDEDIR)/bytes_to_int_flag.h: 
bytes_to_int_flag_generator$(EXEEXT)
./bytes_to_int_flag_generator > $@
 
 noinst_PROGRAMS = bytes_to_int_flag_generator

--
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: A build problem of C++ code on Cygwin

2006-08-22 Thread Brian Dessent
Angelo Graziosi wrote:

> It tries to build C++ with gcc:
> 
>   gcc   bytes_to_int_flag_generator.o   -o bytes_to_int_flag_generator
> 
> ...
> So the question is : what could be the cause of this different behaviour ?
> 

I've seen this a million times.  It's a makefile that doesn't know about
$EXEEXT and assumes that executables have no extension.  Because of this
one of the stock built-in make rules gets invoked instead of the proper
link command.  Look in the Makefile for the rule that generates the
final binary and I'm willing to bet that it has no $EXEEXT.  This works
fine on linux because there is no extension for executables there.

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/



A build problem of C++ code on Cygwin

2006-08-22 Thread Angelo Graziosi

I want to flag the following problem occurred on Cygwin BUT NOT on Linux.
===

I have tried to build LiDIA (A C++ Library For Computational Number
Theory, http://www.informatik.tu-darmstadt.de/TI/LiDIA/) library on
Cygwin.

After the 

   ./configure

the

make

failed:

---
cd library  && make  all
make[1]: Entering directory `/tmp/lidia-2.2.0/.build/library'
Making all in base
make[2]: Entering directory `/tmp/lidia-2.2.0/.build/library/base'
if g++ -DHAVE_CONFIG_H   -I../../include -I../../src/base/include
-I../../../lib
rary/base/../../src/base/include   -O2 -MT bytes_to_int_flag_generator.o
-MD -MP
 -MF ".deps/bytes_to_int_flag_generator.Tpo" -c -o
bytes_to_int_flag_generator.o
 `test -f '../../src/portability/bytes_to_int_flag_generator.cc' || echo
'../../
../library/base/'`../../src/portability/bytes_to_int_flag_generator.cc; \ 
then mv -f
".deps/bytes_to_int_flag_generator.Tpo" ".deps/bytes_to_int_f
lag_generator.Po"; else rm -f
".deps/bytes_to_int_flag_generator.Tpo"; exit 1; f
i

gcc   bytes_to_int_flag_generator.o   -o bytes_to_int_flag_generator

bytes_to_int_flag_generator.o:bytes_to_int_flag_generator.cc:(.text+0x17): undef
ined reference to `std::basic_ostream >&
std::operator<<  >(std::basic_ostream
>&, char const*)'

[]

collect2: ld returned 1 exit status
make[2]: *** [bytes_to_int_flag_generator] Error 1
make[2]: Leaving directory `/tmp/lidia-2.2.0/.build/library/base'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/lidia-2.2.0/.build/library'
make: *** [all-subdirs] Error 2
---

It tries to build C++ with gcc:

  gcc   bytes_to_int_flag_generator.o   -o bytes_to_int_flag_generator

The trick to solve this has been (before the 'make'):


   cd library/base
   g++ ../../../src/portability/bytes_to_int_flag_generator.cc \
   -c -o bytes_to_int_flag_generator.o
   g++ bytes_to_int_flag_generator.o -o bytes_to_int_flag_generator
   cd ../..

then
  
   make

In this way the build was completed succefully.


On Linux (with gcc 4.0.3) all worked fine:

   ./configure
   make


cd library  && make  all
make[1]: Entering directory `/home/angelo/tmp/lidia-2.2.0/.build/library'
Making all in base
make[2]: Entering directory
`/home/angelo/tmp/lidia-2.2.0/.build/library/base'
if g++ -DHAVE_CONFIG_H   -I../../include -I../../src/base/include
-I../../../lib
rary/base/../../src/base/include   -O2 -MT bytes_to_int_flag_generator.o
-MD -MP
 -MF ".deps/bytes_to_int_flag_generator.Tpo" -c -o
bytes_to_int_flag_generator.o
 `test -f '../../src/portability/bytes_to_int_flag_generator.cc' || echo
'../../
../library/base/'`../../src/portability/bytes_to_int_flag_generator.cc; \
then mv -f
".deps/bytes_to_int_flag_generator.Tpo" ".deps/bytes_to_int_f
lag_generator.Po"; else rm -f
".deps/bytes_to_int_flag_generator.Tpo"; exit 1; f
i
/bin/sh ../../libtool --tag=CXX --mode=link g++  -O2   -o
bytes_to_int_flag_gene
rator  bytes_to_int_flag_generator.o
mkdir .libs
g++ -O2 -o bytes_to_int_flag_generator bytes_to_int_flag_generator.o
./bytes_to_int_flag_generator > ../../include/bytes_to_int_flag.h
make  all-am
...



So the question is : what could be the cause of this different behaviour ?


I have all Cygwin installed and updated. 

I use GCC 3.4.4-2 (but also 3.4.4-1 gives the same results).


Cheers,

   Angelo.


--
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: Looking for mkdirhier !

2006-08-22 Thread Will Parsons
mwoehlke wrote:
> [snip]
>
> Actually, I intentionally did not use a shebang... 'mkdir -p "$@"' 
> should work on any Bourne-like shell, although in this case '#!/bin/sh' 
> should suffice.
>
> I'm used to writing portable scripts; anything other than '#!/bin/sh' is 
> very non-portable, and if the script needs to be run on Bourne+ (i.e. 
> bash or ksh), then the only options are a: try to write a wrapper that 
> invokes the script in bash/ksh as a here-doc (or something equally 
> ugly), or b: don't use a shebang. I generally pick the latter.

I think this is a bad idea, since it breaks if run from csh/tcsh.  I had
the experience not long ago of finding a bunch of scripts written by other
people getting errors when I ran them.  This was a system running HP-UX 
(where the Korn shell is the "standard" shell), and the lack of a shebang 
didn't cause  problems for other people, but I was using tcsh.  (There are 
those that like the Korn shell, but I'm not one of them.)

- Will


--
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: popen bug [patch]

2006-08-22 Thread Jeff Johnston

Patch checked in.  Thanks.

-- Jeff J.

Eric Blake wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



Cygwin popen does not match Linux popen when stdout is closed.


...


Oops - when stdout is closed, and the pipe is output on child, cygwin
popen mistakenly lost the pipe in both processes.


The real world case that found this:
cygwin$ echo 'errprint(esyscmd(echo hi))dnl' | m4 >&-
sh: line 0: echo: write error: Bad file descriptor

linux$ echo 'errprint(esyscmd(echo hi))dnl' | m4 >&-
hi



Fixed as follows, along with a fix to obey POSIX "The popen() function
shall ensure that any streams from previous popen() calls that remain open
in the parent process are closed in the new child process."

2006-08-22  Eric Blake  <[EMAIL PROTECTED]>

* libc/posix/popen.c (popen): Don't close output end of pipe in
child if stdout was closed on entry.
[HAVE_FCNTL]: In parent, mark file as close-on-exec, per POSIX.

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

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE61fw84KuGfSFAYARArN1AJ0ePKBbffbvvJaJOyW2XlsXUBFixwCffAvM
xu28ESQ/Md1uD58Bh77N+V4=
=oy2k
-END PGP SIGNATURE-




Index: libc/posix/popen.c
===
RCS file: /cvs/src/src/newlib/libc/posix/popen.c,v
retrieving revision 1.5
diff -u -p -r1.5 popen.c
--- libc/posix/popen.c  6 Jun 2003 19:57:51 -   1.5
+++ libc/posix/popen.c  22 Aug 2006 19:13:23 -
@@ -1,7 +1,7 @@
 /* $NetBSD: popen.c,v 1.11 1995/06/16 07:05:33 jtc Exp $   */
 
 /*

- * Copyright (c) 1988, 1993
+ * Copyright (c) 1988, 1993, 2006
  * The Regents of the University of California.  All rights reserved.
  *
  * This code is derived from software written by Ken Arnold and
@@ -55,6 +55,7 @@ static char rcsid[] = "$NetBSD: popen.c,
 #include 
 #include 
 #include 
+#include 
 
 static struct pid {

struct pid *next;
@@ -102,7 +103,9 @@ _DEFUN(popen, (program, type),
(void)dup2(pdes[1], STDOUT_FILENO);
(void)close(pdes[1]);
}
-   (void) close(pdes[0]);
+   if (pdes[0] != STDOUT_FILENO) {
+   (void) close(pdes[0]);
+   }
} else {
if (pdes[0] != STDIN_FILENO) {
(void)dup2(pdes[0], STDIN_FILENO);
@@ -129,6 +132,12 @@ _DEFUN(popen, (program, type),
(void)close(pdes[0]);
}
 
+#ifdef HAVE_FCNTL

+   /* Hide pipe from future popens; assume fcntl can't fail.  */
+   fcntl (fileno (iop), F_SETFD,
+  fcntl (fileno (iop), F_GETFD, 0) | FD_CLOEXEC);
+#endif /* HAVE_FCNTL */
+
/* Link into list of file descriptors. */
cur->fp = iop;
cur->pid =  pid;



--
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: coreutils 5.97; mkdir -p; mkdir: cannot create directory `name': File exists

2006-08-22 Thread Rolf Campbell

Eric Blake wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

From: Rolf Campbell

I believe there is a race-condition in "mkdir -p".  Specifically, if the
directory does not exist *yet* when stat is called on line #98 of
"coreutils-5.97/lib/mkdir-p.c", but the directory *does* exist by the
time line #190 of the same file calls mkdir(), then the program will
error with "File exists".

I hit this occasionally when doing parallel builds.


Are you sure you have the right line numbers?  The cygwin version of
lib/mkdir-p.c is patched in coreutils-5.97-1; but even the upstream
version takes great pains that this is not a race - yes, the directory can
be created between the time it is statted and the mkdir, but the mkdir
takes this into account by trying to chdir into the directory on failure,
before giving up with an error message to the user that the file exists.

I will need a stronger argument to believe that there is a race, in which
case, the upstream maintainers would probably like to hear it too.


Oops, after closer inspection, the problem was with my makefile. *sigh*


--
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: coreutils 5.97; mkdir -p; mkdir: cannot create directory `name': File exists

2006-08-22 Thread mwoehlke

Rolf Campbell wrote:
I believe there is a race-condition in "mkdir -p".  Specifically, if the 
directory does not exist *yet* when stat is called on line #98 of 
"coreutils-5.97/lib/mkdir-p.c", but the directory *does* exist by the 
time line #190 of the same file calls mkdir(), then the program will 
error with "File exists".


I hit this occasionally when doing parallel builds.


The coreutils list would be a nice place to send this, unless you have 
reason to believe that only Cygwin is affected?


--
Matthew
'$ time make world' -> real 5d:14h:37m:5.291s  user 0m:0.000s  sys 
4d:2h:14m:43.712s



--
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: popen bug [patch]

2006-08-22 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

> Cygwin popen does not match Linux popen when stdout is closed.
...
> Oops - when stdout is closed, and the pipe is output on child, cygwin
> popen mistakenly lost the pipe in both processes.
>
>
> The real world case that found this:
> cygwin$ echo 'errprint(esyscmd(echo hi))dnl' | m4 >&-
> sh: line 0: echo: write error: Bad file descriptor
>
> linux$ echo 'errprint(esyscmd(echo hi))dnl' | m4 >&-
> hi

Fixed as follows, along with a fix to obey POSIX "The popen() function
shall ensure that any streams from previous popen() calls that remain open
in the parent process are closed in the new child process."

2006-08-22  Eric Blake  <[EMAIL PROTECTED]>

* libc/posix/popen.c (popen): Don't close output end of pipe in
child if stdout was closed on entry.
[HAVE_FCNTL]: In parent, mark file as close-on-exec, per POSIX.

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

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE61fw84KuGfSFAYARArN1AJ0ePKBbffbvvJaJOyW2XlsXUBFixwCffAvM
xu28ESQ/Md1uD58Bh77N+V4=
=oy2k
-END PGP SIGNATURE-
Index: libc/posix/popen.c
===
RCS file: /cvs/src/src/newlib/libc/posix/popen.c,v
retrieving revision 1.5
diff -u -p -r1.5 popen.c
--- libc/posix/popen.c  6 Jun 2003 19:57:51 -   1.5
+++ libc/posix/popen.c  22 Aug 2006 19:13:23 -
@@ -1,7 +1,7 @@
 /* $NetBSD: popen.c,v 1.11 1995/06/16 07:05:33 jtc Exp $   */
 
 /*
- * Copyright (c) 1988, 1993
+ * Copyright (c) 1988, 1993, 2006
  * The Regents of the University of California.  All rights reserved.
  *
  * This code is derived from software written by Ken Arnold and
@@ -55,6 +55,7 @@ static char rcsid[] = "$NetBSD: popen.c,
 #include 
 #include 
 #include 
+#include 
 
 static struct pid {
struct pid *next;
@@ -102,7 +103,9 @@ _DEFUN(popen, (program, type),
(void)dup2(pdes[1], STDOUT_FILENO);
(void)close(pdes[1]);
}
-   (void) close(pdes[0]);
+   if (pdes[0] != STDOUT_FILENO) {
+   (void) close(pdes[0]);
+   }
} else {
if (pdes[0] != STDIN_FILENO) {
(void)dup2(pdes[0], STDIN_FILENO);
@@ -129,6 +132,12 @@ _DEFUN(popen, (program, type),
(void)close(pdes[0]);
}
 
+#ifdef HAVE_FCNTL
+   /* Hide pipe from future popens; assume fcntl can't fail.  */
+   fcntl (fileno (iop), F_SETFD,
+  fcntl (fileno (iop), F_GETFD, 0) | FD_CLOEXEC);
+#endif /* HAVE_FCNTL */
+
/* Link into list of file descriptors. */
cur->fp = iop;
cur->pid =  pid;

--
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: Prevent closing a NULL pinfo handle

2006-08-22 Thread Brian Ford
On Thu, 17 Aug 2006, Christopher Faylor wrote:

> I'll look into it when I have the time although I am not seeing this
> particular problem.

In case you'd like an STC:

$ cat system.c
#include 

int
main(void)
{
return system("/usr/bin/ls");
}

$ gcc -g -Wall -O2 system.c -o system

$ ./system
system.c  system.exe
CloseHandle(moreinfo->myself_pinfo) 0x0 failed
child_info_spawn::~child_info_spawn():125, Win32 error 6

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



Re: coreutils 5.97; mkdir -p; mkdir: cannot create directory `name': File exists

2006-08-22 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

From: Rolf Campbell
> I believe there is a race-condition in "mkdir -p".  Specifically, if the
> directory does not exist *yet* when stat is called on line #98 of
> "coreutils-5.97/lib/mkdir-p.c", but the directory *does* exist by the
> time line #190 of the same file calls mkdir(), then the program will
> error with "File exists".
> 
> I hit this occasionally when doing parallel builds.

Are you sure you have the right line numbers?  The cygwin version of
lib/mkdir-p.c is patched in coreutils-5.97-1; but even the upstream
version takes great pains that this is not a race - yes, the directory can
be created between the time it is statted and the mkdir, but the mkdir
takes this into account by trying to chdir into the directory on failure,
before giving up with an error message to the user that the file exists.

I will need a stronger argument to believe that there is a race, in which
case, the upstream maintainers would probably like to hear it too.

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

Eric Blake [EMAIL PROTECTED]
volunteer cygwin coreutils maintainer
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE61HV84KuGfSFAYARAiB+AJ44hlkTkvIbrXQhqB9/E8HaF7neMwCfeke/
491C9NVNTutnL4Ds1pVXygs=
=Fdu4
-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/



coreutils 5.97; mkdir -p; mkdir: cannot create directory `name': File exists

2006-08-22 Thread Rolf Campbell
I believe there is a race-condition in "mkdir -p".  Specifically, if the 
directory does not exist *yet* when stat is called on line #98 of 
"coreutils-5.97/lib/mkdir-p.c", but the directory *does* exist by the 
time line #190 of the same file calls mkdir(), then the program will 
error with "File exists".


I hit this occasionally when doing parallel builds.

Cygwin Configuration Diagnostics
Current System Time: Tue Aug 22 14:18:34 2006

Windows XP Professional Ver 5.1 Build 2600 Service Pack 2

Path:   D:\cygwin\usr\local\bin
D:\cygwin\bin
D:\cygwin\bin
D:\cygwin\usr\X11R6\bin
C:\Program Files\Python24\
D:\cygwin\bin
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\Program Files\Perforce
C:\Program Files\Code Collaborator Client

Output from D:\cygwin\bin\id.exe (nontsec)
UID: 11643(rcampbell)GID: 10513(Domain Users)
544(Administrators)  545(Users)   10513(Domain Users)
14591(dr-john-spicer)12700(s-rnd-all) 12536(s-software-all)
12532(s-software-node)

Output from D:\cygwin\bin\id.exe (ntsec)
UID: 11643(rcampbell)GID: 10513(Domain Users)
544(Administrators)  545(Users)   10513(Domain Users)
14591(dr-john-spicer)12700(s-rnd-all) 12536(s-software-all)
12532(s-software-node)

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

USER = 'rcampbell'
PWD = '/tmp'
HOME = '/home/rcampbell'
MAKE_MODE = 'unix'

HOMEPATH = '\Documents and Settings\rcampbell'
MANPATH = '/usr/local/man:/usr/share/man:/usr/man::/usr/ssl/man'
APPDATA = 'C:\Documents and Settings\rcampbell\Application Data'
HOSTNAME = 'desk-rcampbell'
TERM = 'xterm'
PROCESSOR_IDENTIFIER = 'x86 Family 15 Model 4 Stepping 7, GenuineIntel'
WINDIR = 'C:\WINDOWS'
GHS_LMWHICH = 'elan'
WINDOWID = '6940208'
OLDPWD = '/usr/src'
USERDOMAIN = 'TROPICNETWORKS'
OS = 'Windows_NT'
ALLUSERSPROFILE = 'C:\Documents and Settings\All Users'
TEMP = '/cygdrive/d/Temp'
COMMONPROGRAMFILES = 'C:\Program Files\Common Files'
USERNAME = 'rcampbell'
PROCESSOR_LEVEL = '15'
GHS_LMHOST = '@server2,server1'
FP_NO_HOST_CHECK = 'NO'
SYSTEMDRIVE = 'C:'
USERPROFILE = 'C:\Documents and Settings\rcampbell'
ULTRAMON_LANGDIR = 'C:\Program Files\UltraMon\Resources\en'
PS1 = '\[\e]0;[EMAIL PROTECTED] \[\e[33m\]\w\[\e[0m\]\n\$ '
LOGONSERVER = '\\EXCHANGE'
PROCESSOR_ARCHITECTURE = 'x86'
SHLVL = '1'
COLORFGBG = '0;default;15'
USERDNSDOMAIN = 'TROPICNETWORKS.COM'
PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.py;.pyw'
HOMEDRIVE = 'C:'
GHS_LMQ_METHOD = '0'
COMSPEC = 'C:\WINDOWS\system32\cmd.exe'
TMP = '/cygdrive/d/Temp'
SYSTEMROOT = 'C:\WINDOWS'
PRINTER = '\\spooler\135MC-4th'
CVS_RSH = '/bin/ssh'
PROCESSOR_REVISION = '0407'
INFOPATH = '/usr/local/info:/usr/share/info:/usr/info:'
PROGRAMFILES = 'C:\Program Files'
DISPLAY = ':0'
NUMBER_OF_PROCESSORS = '2'
SESSIONNAME = 'Console'
P4CONFIG = '.p4config'
COMPUTERNAME = 'DESK-RCAMPBELL'
COLORTERM = 'rxvt-xpm'
_ = '/usr/bin/cygcheck'
POSIXLY_CORRECT = '1'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
  (default) = '/cygdrive'
  cygdrive flags = 0x0022
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = 'D:\cygwin'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/c
  (default) = 'C:'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/d
  (default) = 'C:\d'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
  (default) = 'D:\cygwin/bin'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
  (default) = 'D:\cygwin/lib'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options

a:  fd N/AN/A
c:  hd  NTFS 40954Mb  25% CP CS UN PA FC Mirror
d:  hd  NTFS 70645Mb  44% CP CS UN PA FC Stripe
e:  cd N/AN/A

D:\cygwin  /  system  binmode
C: /c system  binmode
C:\d   /d system  binmode
D:\cygwin/bin  /usr/bin   system  binmode
D:\cygwin/lib  /usr/lib   system  binmode
.  /cygdrive  system  binmode,cygdrive

Found: D:\cygwin\bin\awk.exe
Found: D:\cygwin\bin\bash.exe
Found: D:\cygwin\bin\cat.exe
Found: D:\cygwin\bin\cp.exe
Found: D:\cygwin\bin\cpp.exe
Not Found: crontab
Found: D:\cygwin\bin\find.exe
Found: D:\cygwin\bin\gcc.exe
Not Found: gdb
Found: D:\cygwin\bin\grep.exe
Found: D:\cygwin\bin\kill.exe
Found: D:\cygwin\bin\ld.exe
Found: D:\cygwin\bin\ls.exe
Found: D:\cygwin\bin\make.exe
Found: D:\cygwin\bin\mv.exe
Not Found: patch
F

RE: Looking for mkdirhier !

2006-08-22 Thread Igor Peshansky
On Tue, 22 Aug 2006, Dave Korn wrote:

> On 22 August 2006 16:57, mwoehlke wrote:
>
> > Dave Korn wrote:
> >> On 22 August 2006 07:50, Guillaume MARTIN wrote:
> >>
> >>> How could I install mkdir in cygwin ?
> >>
> >> [EMAIL PROTECTED] /tmp> alias mkdirhier='mkdir -p'
> >
> > ...but you would have to set that alias in whatever this script is...
>
>   Yep.  Or in your global /etc/profile or whereever.
>
> > Better:
> >
> > $ cat > /bin/mkdirhier
> >>
> > mkdir -p "$@"
> > ^D
> > $ chmod +x /bin/mkdirhier
> >
> > (Note: ^D above means hold 'ctrl' and press 'D')
>
>   Would be even better if you put a shebang on the first line, in case it's
> invoked from a non-bash shell.

And wrapped in an exec, both to propagate the exit code, and to avoid
having an extra bash process hanging around, i.e.,

exec mkdir -p "$@"

:-)
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_Igor Peshansky, Ph.D. (name changed!)
 |,4-  ) )-,_. ,\ (  `'-'   old name: Igor Pechtchanski
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

--
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: Looking for mkdirhier !

2006-08-22 Thread mwoehlke

Dave Korn wrote:

On 22 August 2006 16:57, mwoehlke wrote:

Dave Korn wrote:

On 22 August 2006 07:50, Guillaume MARTIN wrote:

How could I install mkdir in cygwin ?

[EMAIL PROTECTED] /tmp> alias mkdirhier='mkdir -p'

...but you would have to set that alias in whatever this script is...
Better:

$ cat > /bin/mkdirhier
mkdir -p "$@"
^D
$ chmod +x /bin/mkdirhier

(Note: ^D above means hold 'ctrl' and press 'D')


  Would be even better if you put a shebang on the first line, in case it's
invoked from a non-bash shell.


Actually, I intentionally did not use a shebang... 'mkdir -p "$@"' 
should work on any Bourne-like shell, although in this case '#!/bin/sh' 
should suffice.


I'm used to writing portable scripts; anything other than '#!/bin/sh' is 
very non-portable, and if the script needs to be run on Bourne+ (i.e. 
bash or ksh), then the only options are a: try to write a wrapper that 
invokes the script in bash/ksh as a here-doc (or something equally 
ugly), or b: don't use a shebang. I generally pick the latter.


--
Matthew
'$ time make world' -> real 5d:14h:37m:5.291s  user 0m:0.000s  sys 
4d:2h:14m:43.712s



--
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: Looking for mkdirhier !

2006-08-22 Thread Dave Korn
On 22 August 2006 16:57, mwoehlke wrote:

> Dave Korn wrote:
>> On 22 August 2006 07:50, Guillaume MARTIN wrote:
>> 
>>> How could I install mkdir in cygwin ?
>> 
>> [EMAIL PROTECTED] /tmp> alias mkdirhier='mkdir -p'
> 
> ...but you would have to set that alias in whatever this script is...

  Yep.  Or in your global /etc/profile or whereever.
 
> Better:
> 
> $ cat > /bin/mkdirhier
>> 
> mkdir -p "$@"
> ^D
> $ chmod +x /bin/mkdirhier
> 
> (Note: ^D above means hold 'ctrl' and press 'D')

  Would be even better if you put a shebang on the first line, in case it's
invoked from a non-bash shell.

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: Postfix on Cygwin?

2006-08-22 Thread Jim Drash


Assuming that there isn't a lurker here who's built it, would you be
interested in giving it a go?



I'll try for a bit if no one steps up.

--
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: Postfix on Cygwin?

2006-08-22 Thread Christopher Faylor
On Tue, Aug 22, 2006 at 12:16:21PM -0400, Jim Drash wrote:
>A few years back there were some folks looking to create a cygwin port
>of postfix.  I the time that has passed bot cygwin and postfix have
>gotten better.  Does anyone know if there is a cygwin-port of postfix?

We don't have postfix in the Cygwin distribution but it sure "would be
nice" if it was.

Assuming that there isn't a lurker here who's built it, would you be
interested in giving it a go?

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/



Postfix on Cygwin?

2006-08-22 Thread Jim Drash

A few years back there were some folks looking to create a cygwin port
of postfix.  I the time that has passed bot cygwin and postfix have
gotten better.  Does anyone know if there is a cygwin-port of postfix?

Jim Drash

--
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: singular-*-3.0.2-1

2006-08-22 Thread Angelo Graziosi

Oliver Wienand wrote:

>The current version 3-0-2 ... contains
> also some new features:
>
>
>* factory, libfac updated for gcc 4.1.x

Are these usable with the current GCC (3.4.4) ?

>* configure/speed improved for 64bit architectures
>* new library: dmod.lib ( dmod_lib)
>* new library: perron.lib ( perron_lib)

Are the .lib (a typical MS format) libraries (in /usr/share/Singular/LIB)
compatible with the format used by GCC (.a) ?


Cheers,
  
   Angelo.


--
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: Those nasty bundled Cygwin's

2006-08-22 Thread Eric Hanchrow
Gosh, thanks for the well-written description!

Sure sounds like a lot of work, though :-|
-- 
... belief in the omniscient hacker is indistinguishable from
belief in a Supreme Being.  There is simply no argument one can
give that will dissuade a true believer, yet when the believer is
asked for a demonstration he is unable to produce one.
-- Michael Shamos


--
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: Usage Of Cron and AT commands

2006-08-22 Thread mwoehlke

[EMAIL PROTECTED] wrote (again):

  Hi CygWinners,
  I would like to know the syntax of crontab, cron and at commands for
  its use in task scheduling.
[snip]


Please read the replies to your first post instead of posting again.

And please lose the obnoxiously long signature and unenforceable 
disclaimer. Everything below your name is superfluous, and quoting your 
e-mail address is inviting spam (similarly, you should set your 'to' to 
display your name instead of your e-mail address).


--
Matthew
'$ time make world' -> real 5d:14h:37m:5.291s  user 0m:0.000s  sys 
4d:2h:14m:43.712s



--
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: Looking for mkdirhier !

2006-08-22 Thread mwoehlke

Dave Korn wrote:

On 22 August 2006 07:50, Guillaume MARTIN wrote:


How could I install mkdir in cygwin ?


[EMAIL PROTECTED] /tmp> alias mkdirhier='mkdir -p'


...but you would have to set that alias in whatever this script is...

Better:

$ cat > /bin/mkdirhier
:
mkdir -p "$@"
^D
$ chmod +x /bin/mkdirhier

(Note: ^D above means hold 'ctrl' and press 'D')

--
Matthew
'$ time make world' -> real 5d:14h:37m:5.291s  user 0m:0.000s  sys 
4d:2h:14m:43.712s



--
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 with malloc/realloc. Pls help.

2006-08-22 Thread Omololu
Thanks a lot, Igor & Mark. i was able to rectify the
code to fix the problem. Now it works. (i had to use a
pointer to a pointer to int, rather than just a
pointer to int in the subroutine)

thanks again. 

o.

--- Igor Peshansky <[EMAIL PROTECTED]> wrote:

> On Mon, 21 Aug 2006, Omololu wrote:
> 
> > Hi,
> >  i have the following code. it compiles with gcc
> in Cygwin but the
> > contents of the array ifitQ that I get after the
> call to the subroutine
> > readCharges2 is gibberish.
> 
> This is expected behavior.  Read on.
> 
> > The code compiles with gcc under Linux and it runs
> correctly. it also
> > compiles and runs correctly with windows visual
> studio. Pls help. The
> > resuls i get with Cygwin is:
> >
> > isumNatms = 5
> > rrr 13
> > rrr 14
> > rrr 15
> > rrr 16
> > *** 1628693268
> > *** 1628693268
> > *** 16
> > *** 1034
> >
> > instead of:
> > isumNatms = 5
> > rrr 13
> > rrr 14
> > rrr 15
> > rrr 16
> > *** 13
> > *** 14
> > *** 15
> > *** 16
> >
> > the code is:
> 
> Ouch.  Indentation issues aside, you have a bug in
> this program.
> 
> > #include 
> > #include 
> >
> > void readCharges2(int *, int *, int *);
> > int main()
> > {
> > static int *ifitQ;
> > int *ipUniqAtms, *ipindexToFit;
> > int j;
> > int x,y;
> > ipUniqAtms =&x;
> > ipindexToFit=&y;
> >ifitQ = (int *)
> malloc(sizeof(int));
> >if(ifitQ==NULL){printf("Unable to allocate
> matrix ifitQ\n");
> >exit(EXIT_FAILURE);}
> >
> readCharges2(ifitQ,ipUniqAtms,ipindexToFit);
> 
> Note that ifitQ is passed *by value*, and any
> changes you make to it
> inside readCharges2() will be lost when you come
> back to main.  So, you
> realloc it inside readCharges2(), and store values
> in the new array, but
> in main(), you print the values in the *old* array
> (which are, as you
> said, gibberish, as the memory has been released to
> the system).
> 
> >for(j=0; j< *ipUniqAtms ; j++)
> >{
> >   printf("*** %d\n",ifitQ[j]);
> >}
> >
> > return 0;
> > }
> >
> > void readCharges2(int *ifitQ, int * ipUniqAtms,
> int * ipindexToFit)
> > {
> >int  j, isumNatms=0;
> >isumNatms=5;
> >printf("isumNatms = %d \n",isumNatms);
> >ifitQ = (int *)
> realloc(ifitQ,isumNatms*sizeof(int));
> >if(ifitQ==NULL){printf("Unable to allocate
> matrix ifitQ\n");
> >exit(EXIT_FAILURE);}
> >
> >ifitQ[0]=13;
> >ifitQ[1]=14;
> >ifitQ[2]=15;
> >ifitQ[3]=16;
> > *ipUniqAtms =  4;
> > *ipindexToFit =  3;
> >for(j=0; j< *ipUniqAtms ; j++)
> >{
> >   printf("rrr %d\n",ifitQ[j]);
> >}
> > }
> 
> The reason it probably worked on Linux is because in
> Linux, realloc will
> try hard to keep the array at the same address if it
> can simply bump the
> size of the pointer.  Cygwin's realloc doesn't.
> HTH,
>   Igor
> -- 
>   http://cs.nyu.edu/~pechtcha/
>   |\  _,,,---,,_  [EMAIL PROTECTED] |
> [EMAIL PROTECTED]
> ZZZzz /,`.-'`'-.  ;-;;,_  Igor Peshansky, Ph.D.
> (name changed!)
>  |,4-  ) )-,_. ,\ (  `'-' old name: Igor
> Pechtchanski
> '---''(_/--'  `-'\_) fL   a.k.a
> JaguaR-R-R-r-r-r-.-.-.  Meow!
> 
> "Las! je suis sot... -Mais non, tu ne l'es pas,
> puisque tu t'en rends compte."
> "But no -- you are no fool; you call yourself a
> fool, there's proof enough in
> that!" -- Rostand, "Cyrano de Bergerac"
> 


* SEEK GOD! ***

--
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: Those nasty bundled Cygwin's

2006-08-22 Thread Sam Robb
On Mon, 2006-08-21 at 10:17 -0400, Larry Hall (Cygwin) wrote:
> Eric Hanchrow wrote:
> >> "Larry" == Larry Hall (Cygwin)  >> com> writes:
> 
> 
> . Thanks.
> 
> 
> > 
> > Larry> This has also been discussed before.  If you'd like to
> > Larry> understand the options, I'd recommend reviewing the email
> > Larry> archives for threads on this issue.
> > 
> > Thanks; I assume you mean the thread that starts with this message
> > 
> > http://article.gmane.org/gmane.os.cygwin/22549
> > 
> > ?
> 
> 
> Yes, that is one.

In case this helps... in an earlier message, you asked:

> But I was wondering -- how _is_ a vendor such as FreeNX supposed to
> distribute software that depends on Cygwin?  How can they avoid having
> their own, separate, Cygwin installation on the user's machine?

The company I work for (TimeSys [1]) provides development kits for
embedded Linux systems.  We supply an Eclipse-based IDE that runs under
Linux and Windows, as well as cross-compilers for both environments.
Under Windows, the easiest and best way for us to provide our users with
a consistent set of development tools was to build on top of Cygwin.

Very early on, we made the decision to "do the right thing" with regard
to Cygwin.  That is, instead of slinging the Cygwin DLL around all
willy-nilly [2], we built a custom Cygwin installer that is essentially
just a wrapper around the Cygwin setup program.  Our custom installer
uses a local package directory, setup.exe, and a customized setup.ini in
order to install Cygwin.

Here's what we do to prepare a Cygwin snapshot:

  - Use mkcygwget to download packages to a local directory
(http://www.cygwin.com/ml/cygwin/2004-01/msg00056.html)
  - Cull any older packages from the downloaded package set
  - Add a couple of custom packages (binary and source, thank you) that
provide some tools that aren't currently in the Cygwin net distro.
  - Split packages into a two hierarchies: one for binary packages, one
for source packages. [3]
  - Munge setup.ini to put all the packages we want to automatically
install into the 'Base' category
  - Merge all of this with the custom installer code so we can call
setup.exe with the command-line arguments we need to have setup.exe
install Cygwin for us.

When we do an install:

  - Determine if the user already has Cygwin installed.
  - If they do, and the version of Cygwin is < our snapshot version,
then we offer to use the snapshot to upgrade their Cygwin install.
  - If they don't have Cygwin installed, then we offer to use the
snapshot to create an initial Cygwin install.
  - If they choose to install or upgrade Cygwin, then we figure out
the right command line arguments to pass to setup.exe, and let
it do the work of installing Cygwin for us.

All of this buys us a couple of things.  First, we're able to deal
properly with end users who already have Cygwin installed - we can
either skip that phase of the install process, or offer to install or
upgrade their current version of Cygwin. 

Second, we have the ability to introduce custom packages into the setup
process.  We don't use it for anything heavy, really - we provide some
startup scripts and a build of ISC DHCP.  Still, we have the option to
provide additional packages outside of those available in the Cygwin net
distribution, if we want to or need to do so.

Third, we abrogate *all* responsibility for installing Cygwin to the
standard method (setup.exe).  If we run into problems with an install,
we can reproduce it outside of our installer shell, and report the
problem on the Cygwin mailing lists.  One of our users who has Cygwin
installed on their system has exactly what they would get if they had
used setup.exe themselves, so there's no difference between their
installation and one that someone created "by hand" using setup.exe.

This isn't to say that it wouldn't be nice if setup.exe had some
enhancements.  For example, the ability to specify a list of packages to
install on the command line would allow us to get rid of the step where
we munge setup.ini to put everything into the 'Base' category.
Similarly, it would be neat to be able to specify an additional
setup.ini that could be used to provide "extra" packages for the
installer.

Despite the fact that setup.exe isn't *exactly* what we would want [4],
we find that it does the job - and does it well enough that we haven't
significantly changed how we deal with Cygwin in over 4 years. 

-Samrobb

[1] Yes, the same TimeSys that cgf currently works for.  The way we
install Cygwin predates his coming to the company, though.
[2] To be honest, our original installs *did* sling the Cygwin DLL
around.  We ran into serious problems with that very quickly,
which is why we changed over to our current method.
[3] These are used to create separate CD images, so that customers
can choose whether or not they want to download 700 MB of source

RE: read() blocking and TIOCINQ

2006-08-22 Thread Nellis, Kenneth
The value of errno might give you a clue.

--Ken Nellis

-Original Message-
From: Ernesto Paiser [mailto:paiser at esrf dot fr] 
Sent: Tuesday, August 22, 2006 4:11 AM
To: cygwin at cygwin dot com
Subject: read() blocking and TIOCINQ

Hello Corinna,
I have problems with read() function blocking and
waiting for characters on serial line with cygwin:

Here are some code fragments:

fd = open(sl, O_RDWR | O_NOCTTY | O_NONBLOCK | O_NDELAY)

newpio.c_cflag = brate | CS8 | CLOCAL | CREAD;
newpio.c_iflag = IGNPAR | ICRNL;
newpio.c_oflag = 0;
newpio.c_lflag = 0;
newpio.c_cc[VTIME]= 1;
newpio.c_cc[VMIN] = 0;
...

n = ioctl(fd, TIOCINQ, &n); //It gives me an error (return -1) why??!!!

and

n = read(fd, buffer, 1);  <<< HERE IS BLOCKING!!!


TIOCINQ is working on CYGWIN,

Is there another way to solve this problem???

Thank you in advance,
  Ernesto.

-- 
Ernesto PAISER  [EMAIL PROTECTED]
E.S.R.F. - European Synchrotron Radiation Facility
6 rue Jules Horowitz  BP 220 Grenoble CEDEX France
phone +33 4 76 88 23 48  fax +33 4 76 88 23 25


--
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: singular-*-3.0.2-1

2006-08-22 Thread Oliver Wienand

Version 3.0.2-1 of "Singular" has been uploaded.

About:

SINGULAR is a Computer Algebra System for polynomial computations with
special emphasis on the needs of commutative algebra, algebraic
geometry, and singularity theory.

Changes:

The current version 3-0-2 is mainly a bug fix release, but it contains
also some new features:

* factory, libfac updated for gcc 4.1.x
* configure/speed improved for 64bit architectures
* new library: dmod.lib ( dmod_lib)
* new library: perron.lib ( perron_lib)
* improved center.lib ( center_lib): revised implementation,
 new functions (sa_reduce etc.)
* revised ncalg.lib ( ncalg_lib): new algebras, U(sl_n) and
  U(g_2) changed to conform GAP.
* new algorithms in primdec.lib ( primdec_lib): radical et al.
* improved version of slimgb, incorporated into groebner
* improved module generator (modgen)
* experimental: new type bigint
* more architectures: Solaris on x86/opteron, ...
* build process improved: builds automatically without patches
  on 64bit architectures

If you have questions or comments, please send them to the Cygwin
mailing list at: cygwin@cygwin.com .

  *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

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

[EMAIL PROTECTED]

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

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

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


--
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: read() blocking and TIOCINQ

2006-08-22 Thread Igor Peshansky
On Tue, 22 Aug 2006, Ernesto Paiser wrote:

> Hello Corinna,

FYI, this is a mailing list, and unless you're replying to a specific
message, you're actually talking to many people.

> I have problems with read() function blocking and
> waiting for characters on serial line with cygwin:
>
> Here are some code fragments:
> 
> fd = open(sl, O_RDWR | O_NOCTTY | O_NONBLOCK | O_NDELAY)
>
> newpio.c_cflag = brate | CS8 | CLOCAL | CREAD;
> newpio.c_iflag = IGNPAR | ICRNL;
> newpio.c_oflag = 0;
> newpio.c_lflag = 0;
> newpio.c_cc[VTIME]= 1;
> newpio.c_cc[VMIN] = 0;
> ...
>
> n = ioctl(fd, TIOCINQ, &n); //It gives me an error (return -1) why??!!!
>
> and
>
> n = read(fd, buffer, 1);  <<< HERE IS BLOCKING!!!
> 
>
> TIOCINQ is working on CYGWIN,
>
> Is there another way to solve this problem???

Please post a complete compilable test case that reproduces the problem.
For example, in the above code, it's unclear what the variable sl contains
(and I suspect it contains "COM1", which is a no-no -- you should be using
"/dev/ttyS0").
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_Igor Peshansky, Ph.D. (name changed!)
 |,4-  ) )-,_. ,\ (  `'-'   old name: Igor Pechtchanski
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

--
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: My script doesn't work under cygwin cron

2006-08-22 Thread Igor Peshansky
Ugh, top-posting...  Reformatted.

On Mon, 21 Aug 2006, liora milbaum wrote:

> Igor Peshansky wrote:
> >
> > On Sun, 20 Aug 2006, liora milbaum wrote:
> >
> >> It works fine under the cygwin shell not under cron.
> >>
> >> This is the output of the command:
> >>
> >> Can't load '/usr/lib/perl5/site_perl/5.8/cygwin/auto/GD/GD.dll' for
> >> module GD: No such file or directory at
> >> /usr/lib/perl5/5.8/cygwin/DynaLoader.pm line 230.
> >>  at /usr/local/bin/cl_graph line 12
> >> Compilation failed in require at /usr/local/bin/cl_graph line 12.
> >> BEGIN failed--compilation aborted at /usr/local/bin/cl_graph line 12.
> >
> > Hi, Liora,
> >
> > Cron runs as the SYSTEM user.  Make sure you have enough permissions for
> > SYSTEM to access the /usr/lib/perl5/... hierarchy.  You may also have a
> > mount issue, where the required mounts are missing for the SYSTEM user
> > (e.g., if you initially installed Cygwin for "Just me").
> >
> > In fact, you should have read and followed the Cygwin problem reporting
> > guidelines at , especially the part that
> > asks you to attach the output of "cygcheck -svr" on your machine -- that
> > output would have given us the answer to at least the mount question.
> > Igor
>
> Hi Igor,
>
> I have changed the user who runs cron to myself. I think that this
> should eliminate all permissions problems.
>
> Please find attached the output of cygcheck.

Hi, Liora,

Indeed, running cron as yourself (especially if you supply the password)
should result in permission problems only if you have trouble running your
script from your regular command line (which I assume you don't).  The
next thing to check is the environment (cron doesn't run a login shell).

BTW, did you run cron_diagnose.sh?

Other than having your HOME set to a UNC path (which CMD apparently
doesn't like), I don't see anything wrong with your cygcheck output.

It could also be an instance of
, for which a rebaseall
was recommended.  See if that helps.

Sorry, I'm pretty much out of ideas.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_Igor Peshansky, Ph.D. (name changed!)
 |,4-  ) )-,_. ,\ (  `'-'   old name: Igor Pechtchanski
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

--
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 with physical memory detected

2006-08-22 Thread Dave Korn
On 22 August 2006 10:50, Stephane Goarzin wrote:

> Hi,
> 
> I installed cygwin on a Windows 2000 Server with 4GB of RAM, but when I
> execute vmstat only 2GB are detected. I did the manipulation explain in the
> topic "Changing Cygwin's Maximum Memory" but it had no effect. Is it a
> restriction of cygwin or is there any solution ?


  It is a restriction of the O/S.  Try googling MSDN for information about the
"/3GB" switch in boot.ini, which can help a bit, but Cygwin does not support
the PAE functionality that would be needed to get any more memory.

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: Problem with physical memory detected

2006-08-22 Thread Václav Haisman
Stephane Goarzin wrote:
> Hi,
> 
> I installed cygwin on a Windows 2000 Server with 4GB of RAM, but when I 
> execute
> vmstat only 2GB are detected. I did the manipulation explain in the topic
> "Changing Cygwin's Maximum Memory" but it had no effect. Is it a restriction 
> of
> cygwin or is there any solution ?
> 
> Thank's for help.
> 
> Regards.
With the default settings, usually, on any 32bit OS, including Win2k and
Linux and FreeBSD, there is only 2G of virtual memory accessible for
user process. The other 2G part is for kernel to use. Each OS has some
knobs that you can turn to change the ratio to 3:1 or some other split.
But there is always a part that is just for kernel to use, inaccessible
to user process.

--
VH




signature.asc
Description: OpenPGP digital signature


Re: WG: Memory Problem with POSIX Thread under Windows XP

2006-08-22 Thread Christopher Faylor
On Tue, Aug 22, 2006 at 12:46:18PM +0100, Dave Korn wrote:
>On 22 August 2006 11:09, Martin J?hren wrote:
>>I tried following code with vs2005, and...  there is no memory problem!
>>So the bug must be located in CYGWIN or in GCC.  Form now on it seems
>>to me, that I really need help.  Cause I'm not so familiar with deeper
>>CYGWIN or GCC problems.  I'm looking foward for any ideas how to handle
>>the problem...
>
>I would imagine that you need to start looking at newlib.  Probably the
>per-thread reent structures aren't being freed.  This is a WAG,
>however.

If those aren't being freed then it's probably something in thread.cc.

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/



Problem with physical memory detected

2006-08-22 Thread Stephane Goarzin
Hi,

I installed cygwin on a Windows 2000 Server with 4GB of RAM, but when I execute
vmstat only 2GB are detected. I did the manipulation explain in the topic
"Changing Cygwin's Maximum Memory" but it had no effect. Is it a restriction of
cygwin or is there any solution ?

Thank's for help.

Regards.


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



Usage Of Cron and AT commands

2006-08-22 Thread sujit . menon

  Hi CygWinners,
  I would like to know the syntax of crontab, cron and at commands for
  its use in task scheduling.

  Also, I suppose we can do a Cron or AT job using Cygwin installation?

  Please tell me the procedure...  How do we allow permission's
  for the cron job. What file needs to modified to add the user id.

  Warm Regards,
  Sujit Chandran Menon
  Tata Consultancy Services Limited
  Park West - II, Raheja Estate
  Kulupwadi Road, Borivali (East)
  Mumbai - 400 066,Maharashtra
  India
  Mailto: [EMAIL PROTECTED]



ForwardSourceID:NT2FDA
=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



--
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: WG: Memory Problem with POSIX Thread under Windows XP

2006-08-22 Thread Dave Korn
On 22 August 2006 11:09, Martin Jöhren wrote:

> I tried following code with vs2005, and... there is no memory problem! So
> the bug must be located in CYGWIN or in GCC. Form now on it seems to me,
> that I really need help. Cause I'm not so familiar with deeper CYGWIN or GCC
> problems. I'm looking foward for any ideas how to handle the problem...

  I would imagine that you need to start looking at newlib.  Probably the
per-thread reent structures aren't being freed.  This is a WAG, however.


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: WG: Memory Problem with POSIX Thread under Windows XP

2006-08-22 Thread Martin Jöhren
I tried following code with vs2005, and... there is no memory problem! So
the bug must be located in CYGWIN or in GCC. Form now on it seems to me,
that I really need help. Cause I'm not so familiar with deeper CYGWIN or GCC
problems. I'm looking foward for any ideas how to handle the problem...

THX

#include "stdafx.h"
#include "windows.h"

DWORD WINAPI testThread(LPVOID lpParam)
{
double k = 1.23223423;
printf("\r\n %f \r\n",k);
return 0;
}

int _tmain(int argc, _TCHAR* argv[])
{
HANDLE tHandle;


while(1)
{
tHandle = CreateThread(
  NULL,
  NULL,
  &testThread,
  NULL,
  NULL,
  NULL
);
WaitForSingleObject(tHandle,1000);
CloseHandle(tHandle);
}
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/



Re: Installation from hardisk, is it possible?

2006-08-22 Thread Mike Fahlbusch

steven woody wrote:

hi,

i am going to install a copy of cygwin in my notebook, but for some
reasons the computer can not access internet, so i think i have to
download a full suites of installation files on to my desktop computer
and then transfer them to the notebook before i can install from
there. is it possible and how?  thanks.


Because my old Pentium W98SE computer doesn't have enough hard disk 
space to hold the cygwin setup files, I do it this way:


- download the latest cygwin setup file to your desktop computer.  (I've 
tried installing cygwin over the network.  Although setup can see the 
remote folder, it won't accept a pathname that doesn't start with a 
drive letter.)
- use it to download the cygwin files to your HD in its own folder 
(cygwin setup.exe gives the choice of downloading files to HD, 
installing cygwin from the Internet or installing cygwin from HD)
- burn the cygwin folder to CD or preferably DVD, whatever your laptop 
has (there is apparently over 1 Gb of cygwin files.  However if you 
download the default cygwin files it should fit on a CD.)

- make sure the setup.exe file is on the CD
- put the cygwin CD in the laptop and copy the setup file only to its 
own folder on the HD
- you should now be able to run the setup program off the laptop HD, 
point it at the CD cygwin folder and install cygwin as per usual
- presumably this would also work with a large USB memory stick, but I 
can't try it.



--
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: WG: Memory Problem with POSIX Thread under Windows XP

2006-08-22 Thread Samuel Thibault
Martin Jöhren, le Tue 22 Aug 2006 11:13:36 +0200, a écrit :
> This indicates that the problem lies in the cygwin shell or in gcc or
> it is a windows based problem, which could mean that windows is not
> abled to free the threads as fast as the program creates new ones. Any
> ideas?

I doubt it may come from gcc.  To rule out windows, you may want to try
windows's CreateThread(), but I guess the problem really lies in cygwin.

Samuel

--
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: Looking for mkdirhier !

2006-08-22 Thread Dave Korn
On 22 August 2006 07:50, Guillaume MARTIN wrote:

> 
> How could I install mkdir in cygwin ?


[EMAIL PROTECTED] /tmp> mkdir a/b/c/d/e/f
mkdir: cannot create directory `a/b/c/d/e/f': No such file or directory
[EMAIL PROTECTED] /tmp> alias mkdirhier='mkdir -p'
[EMAIL PROTECTED] /tmp> mkdirhier a/b/c/d/e/f
[EMAIL PROTECTED] /tmp> find a
a
a/b
a/b/c
a/b/c/d
a/b/c/d/e
a/b/c/d/e/f
[EMAIL PROTECTED] /tmp>


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: WG: Memory Problem with POSIX Thread under Windows XP

2006-08-22 Thread Martin Jöhren
Hi Samuel,

yes, there is no problem when I write:

double kk = 1.2323231;
while(1)
printf("\r\n %f \r\n",kk);

in main function. The problem occures only in combination with a thread. I
tried now the same code (with some little changes) with the boost thread
library under C++. There is also the same memory problem. This indicates
that the problem lies in the cygwin shell or in gcc or it is a windows based
problem, which could mean that windows is not abled to free the threads as
fast as the program creates new ones. Any ideas?


Martin Jöhren 
Hoppe Bordmesstechnik 
Tel: +49 40/56 19 49-24 
Fax: +49 40/56 19 49-99 
e-mail: [EMAIL PROTECTED] 
Internet: www.hoppe-bmt.de 


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



read() blocking and TIOCINQ

2006-08-22 Thread Ernesto Paiser

Hello Corinna,
I have problems with read() function blocking and
waiting for characters on serial line with cygwin:

Here are some code fragments:

fd = open(sl, O_RDWR | O_NOCTTY | O_NONBLOCK | O_NDELAY)

newpio.c_cflag = brate | CS8 | CLOCAL | CREAD;
newpio.c_iflag = IGNPAR | ICRNL;
newpio.c_oflag = 0;
newpio.c_lflag = 0;
newpio.c_cc[VTIME]= 1;
newpio.c_cc[VMIN] = 0;
...

n = ioctl(fd, TIOCINQ, &n); //It gives me an error (return -1) why??!!!

and

n = read(fd, buffer, 1);  <<< HERE IS BLOCKING!!!


TIOCINQ is working on CYGWIN,

Is there another way to solve this problem???

Thank you in advance,
 Ernesto.

--
Ernesto PAISER  [EMAIL PROTECTED]
E.S.R.F. - European Synchrotron Radiation Facility
6 rue Jules Horowitz  BP 220 Grenoble CEDEX France
phone +33 4 76 88 23 48  fax +33 4 76 88 23 25


--
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: WG: Memory Problem with POSIX Thread under Windows XP

2006-08-22 Thread Samuel Thibault
Hi,

Martin Jöhren, le Tue 22 Aug 2006 09:03:03 +0200, a écrit :
> printf("\r\n%f",kk); 
> If i compile and start the executing file I can see in the windows
> taskmanager, that the memory used by the program increases continuesly every
> second. If I change the code in the testThread function so that printf
> prints an integer variable, instead of double or float, on the console,
> there won't be a problem.

And if you write
  while(1) printf("\r\n%f",kk); 

there is no problem?

Samuel

--
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: program fails to find its DLL

2006-08-22 Thread Eric Thomas

I reply to myself because i'm not registred to the ML.

Thanks a lot for the feedback.

Yes indeed, you're absolutely right Igor.
And the case can easily be reproduced by running any w32 program and
watch its environnement's variables with a tool like process explorer
(sysinternals).
One can also have a similiar result while trying to convert an invalid
path with cygpath
cygpath -w /cygdrive/c/existing_regular_file/
and get an unknown error in return, whereas the following is ok
cygpath -w /cygdrive/c/nonexisting_file/

strace can greatly help here !

Unfortunately I've not been able to find out your patch that would
address that specific point.
Was it a part of a bigger patch that was maybe to obscure to me ?

2 questions left:
. is there any reason for stopping the win32 to posix conversion if one
of the path is realy considered as invalid ?
. should /cygdrive/c/existing_regular_file/ be considered as an invalid
path if /cygdrive/c/nonexisting_file/ is not ?

Regards,
Eric


Eric Thomas wrote:

Hi all,

I've got an issue here with some command line programs, all from the 
same editor.


Commands are issued from bash 3.0.16-14 / cygwin 1.5.18-1 on a
computer running W2K SP4.
Everything was ok until someone introduced an invalid path in the 
default PATH that bash inherits from cmd.exe .

Let's say that PATH is made of 3 parts:
A : valid path
B : invalid path ("invalid" means that it raise my issue)
C : valid path

Since, those programs raise a pop-up to complain that some DLL is
missing in "path displayed".
But "path displayed" is incomplete. In fact "path displayed" is only the
A part.
The missing DLL belongs to one dir of the C part.
So, this invalid value prevents the program to look further in the last
part of PATH.

Well, one would think that the problem is only on the program's side
(and maybe it is). But there are other arguments to look at too.

Only some kind of path format can raise the issue.
Let's say that
/cygdrive/c/a   is a directory
/cygdrive/c/b   is a regular file
/cygdrive/c/c   does not exist

Issue raised with
/cygdrive/c/b/
/cygdrive/c/b/anyfilename_or_dirname

It will also happen with a true invalid path like this one: 
/cygdrive/sure_I_am_an_invalid_path


But the following won't:
/cygdrive/c/a
/cygdrive/c/b
/cygdrive/c/c
everything that doesn't start with /cygdrive

Facts:
- I didn't managed to reproduce the problem when issuing the command
directly from a cmd.exe, excepted by setting PATH to "" of course. But
an invalid path placed in PATH does not hurt.
- I didn't managed to reproduce the problem with any other program that
would requiere some DLL (excel for instance)

So it makes me think that It could be related to cygwin in some way,
even if it occurs only with those programs because they probably behave
differently from other programs...

I've done a fresh installation of cygwin (bash 3.1-6 / cygwin 1.5.21-2)
on another computer.
Some changes with this one:
- no more pop-up, but the program still fails to run due to its missing
DLL
- now "/regular_file/" will also raise the problem (at least this point
is consistent now)

Could those programs explicitly load some DLL after they start-up ? and
rely on PATH to do it on purpuse ?
If so, they manage to deal with invalid path when running from cmd.exe.
Something must be different when run from bash.

Just in case you wonder: same behaviour with ash.

Any comment welcome and appreciated

Regards,
Eric





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



WG: Memory Problem with POSIX Thread under Windows XP

2006-08-22 Thread Martin Jöhren
Hello everyone,

ich have a problem under Windows XP using CYGWIN 3.1.17(6)-release
(i686-pc-cygwin) with GCC 3.4.4 with the following code:


void *testThread(void *data) 
{ 
double kk = 1.232231212; 
printf("\r\n%f",kk); 
//pthread_exit(NULL); 
return(NULL); 
} 

int main (int argc, char *argv[]) 
{ 
pthread_t t; 

while(1) 
{ 

pthread_create(&t,NULL,testThread,NULL); 
pthread_join(t,NULL); 


} 
return 1; 
} 

If i compile and start the executing file I can see in the windows
taskmanager, that the memory used by the program increases continuesly every
second. If I change the code in the testThread function so that printf
prints an integer variable, instead of double or float, on the console,
there won't be a problem. A friend of mine told me, that he tried this code
under Linux and that he hasn't had this problem until now. So have I made a
mistake in configuring my system or is it a bug? I have to mention that the
thread count, which can be observed in the taskmanager too, stays stable at
3 threads. 

Thx a lot for your support guys...

Greetz

Martin Jöhren 
Hoppe Bordmesstechnik 
Tel: +49 40/56 19 49-24 
Fax: +49 40/56 19 49-99 
e-mail: [EMAIL PROTECTED] 
Internet: www.hoppe-bmt.de  



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