What does "+" mean in ""-rwxr-x---+"?

2007-08-08 Thread Alexander Wang
In Cygwin, the "ls -l" command shows following results:

-rwx--+  1 Administrators ...

What does "+" mean?

--
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: What does "+" mean in ""-rwxr-x---+"?

2007-08-08 Thread Brian Dessent
Alexander Wang wrote:
> 
> In Cygwin, the "ls -l" command shows following results:
> 
> -rwx--+  1 Administrators ...
> 
> What does "+" mean?

>From the fine manual:

  Following the file mode bits is a single character that specifies
  whether an alternate access method such as an access control list
  applies to the file.  When the character following the file mode
  bits is a space, there is no alternate access method.  When it is
  a printing character, then there is such a method.

  For a file with an extended access control list, a `+' character is
  listed.  Basic access control lists are equivalent to the
  permissions listed, and are not considered an alternate access
  method.

See also getfacl/setfacl.

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/



Cygwin Cron problem

2007-08-08 Thread shash

Hi,

Before I start, I would like to inform that, I went through all FAQs and
other threads before posting here.
I came across this thread where I faced the similar error, but couldn't get
what they did to resolve it.

http://www.nabble.com/1.5.21-1%3AWindows-2003-Server---Cygwin-Cron-tf2425192.html#a6972241

I 'm trying to schedule a shell script on cygwin using cron. No matter what
I do I don't seem to get the cron job executing my bash script.

My script is temp.sh

echo `date` > /home/test/temp.log

crontab -e is having the following details

* * * * * sh /home/test/temp.sh > /home/test/temp.sh.err 2>&1

I did use the paths in the script itself and I also used the windows path
where the cygwin installed(/cygdrive/d/cygwin/).

I also tried using the following by editing the crontab:

* * * * * date > /home/test/date.txt

Still not working. I don't have administrator login. I ran the
cron_diagnose.sh and it din't give me any errors.

What am I doing wrong? Please help I 'm a newbie to Cygwin.

Thanks
Shash
-- 
View this message in context: 
http://www.nabble.com/Cygwin-Cron-problem-tf4235168.html#a12049954
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 Cron problem

2007-08-08 Thread Pierre A. Humblet
- Original Message - 
From: "shash" 
To: 
Sent: Wednesday, August 08, 2007 5:39 AM
Subject: Cygwin Cron problem


| 
| Hi,
| 
| Before I start, I would like to inform that, I went through all FAQs and
| other threads before posting here.
| I came across this thread where I faced the similar error, but couldn't get
| what they did to resolve it.
| 
| 
http://www.nabble.com/1.5.21-1%3AWindows-2003-Server---Cygwin-Cron-tf2425192.html#a6972241
| 
| I 'm trying to schedule a shell script on cygwin using cron. No matter what
| I do I don't seem to get the cron job executing my bash script.
| 
| My script is temp.sh
| 
| echo `date` > /home/test/temp.log
| 
| crontab -e is having the following details
| 
| * * * * * sh /home/test/temp.sh > /home/test/temp.sh.err 2>&1
| 
| I did use the paths in the script itself and I also used the windows path
| where the cygwin installed(/cygdrive/d/cygwin/).
| 
| I also tried using the following by editing the crontab:
| 
| * * * * * date > /home/test/date.txt
| 
| Still not working. I don't have administrator login. I ran the
| cron_diagnose.sh and it din't give me any errors.

When you run cron_diagnose.sh you should see the following on the screen:
**
If you cannot fix the problem, then report it to [EMAIL PROTECTED]
Please run the script /usr/bin/cronbug and ATTACH its output
(the file cronbug.txt) to your e-mail.
**
Please do that after you have tried to launch cron with cron-config.

Pierre 

--
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 Cron problem

2007-08-08 Thread shash

Thanks Pierre, I have mailed to cygwin.


Pierre A. Humblet wrote:
> 
> - Original Message - 
> From: "shash" 
> To: 
> Sent: Wednesday, August 08, 2007 5:39 AM
> Subject: Cygwin Cron problem
> 
> 
> | 
> | Hi,
> | 
> | Before I start, I would like to inform that, I went through all FAQs and
> | other threads before posting here.
> | I came across this thread where I faced the similar error, but couldn't
> get
> | what they did to resolve it.
> | 
> |
> http://www.nabble.com/1.5.21-1%3AWindows-2003-Server---Cygwin-Cron-tf2425192.html#a6972241
> | 
> | I 'm trying to schedule a shell script on cygwin using cron. No matter
> what
> | I do I don't seem to get the cron job executing my bash script.
> | 
> | My script is temp.sh
> | 
> | echo `date` > /home/test/temp.log
> | 
> | crontab -e is having the following details
> | 
> | * * * * * sh /home/test/temp.sh > /home/test/temp.sh.err 2>&1
> | 
> | I did use the paths in the script itself and I also used the windows
> path
> | where the cygwin installed(/cygdrive/d/cygwin/).
> | 
> | I also tried using the following by editing the crontab:
> | 
> | * * * * * date > /home/test/date.txt
> | 
> | Still not working. I don't have administrator login. I ran the
> | cron_diagnose.sh and it din't give me any errors.
> 
> When you run cron_diagnose.sh you should see the following on the screen:
> **
> If you cannot fix the problem, then report it to [EMAIL PROTECTED]
> Please run the script /usr/bin/cronbug and ATTACH its output
> (the file cronbug.txt) to your e-mail.
> **
> Please do that after you have tried to launch cron with cron-config.
> 
> Pierre 
> 
> --
> 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/
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Cygwin-Cron-problem-tf4235168.html#a12054376
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/



nedit windows integration

2007-08-08 Thread Frederich, Eric P21322
Hi,

I created an nedit shortcut on my desktop.
It is just a shortcut to "c:\cygwin\usr\X11R6\bin\run.exe nedit"
This works fine but I can't drag files on top of it to edit them because
it expects /cygdrive/c/somefile.txt instead of c:\somefile.txt

Is there a solution for this kind of thing?
I thought that run.exe would reformat the parameters into the correct
format but I guess not.
Is there another program that does?...maybe run.exe isn't the way to go.

BTW, I am using Xming as my X server.

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



Re: HEADS UP:Problem with svn under latest snapshot.

2007-08-08 Thread Thomas Berger

It could be a matter of interference with TortoiseSVN.

Joe Smith wrote:
> Just in case you were not aware, Something has broken svn in the latest
> snapshot. (Actually at least the two most recent snapshots have this
> problem).
> 
> Here is the error: "svn: Can't move '.svn/tmp/entries' to
> '.svn/entries': Permission denied"
> 
> 
> LS output:
> $ ls -al .svn
> total 2
> drwxr-xr-x+ 6 Owner None   0 Aug  7 16:11 .
> drwxr-xr-x+ 3 Owner None   0 Aug  7 16:09 ..
> -r--r--r--  1 Owner None 192 Aug  7 16:09 entries
...
> 
> $ ls -al .svn/tmp
> total 1
> drwxr-xr-x+ 5 Owner None   0 Aug  7 16:11 .
> drwxr-xr-x+ 6 Owner None   0 Aug  7 16:11 ..
> -rw-r--r--  1 Owner None 192 Aug  7 16:11 entries
...
> 
> If I were to take a guess, i'm thinking it the "-r--r--r--" permission
> on .svn/entries that is causing the problem.
> Something probably changed in the permissions handling, causing the
> breakage.

Accidentally, I had the same problem today and found the following
helpful: < http://www.cygwin.com/ml/cygwin/2006-09/msg00081.html >
(I didn't have to disable Icon overlays completely, just restrict
them to "explorer only").

The cause seemed to be that "entries" additionally has the Windows R/O
attribute set and cannot be deleted by svn. Some of the #ifdef WIN32 in
libsvn_subr/io.c look interesting (if one argues that the Cygwin port
should put some more efforts in coexisting nicely with native svn
tools).

viele Gruesse
Thomas Berger


--
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: nedit windows integration

2007-08-08 Thread Matthew Woehlke

Frederich, Eric P21322 wrote:

I created an nedit shortcut on my desktop.
It is just a shortcut to "c:\cygwin\usr\X11R6\bin\run.exe nedit"
This works fine but I can't drag files on top of it to edit them because
it expects /cygdrive/c/somefile.txt instead of c:\somefile.txt

Is there a solution for this kind of thing?
I thought that run.exe would reformat the parameters into the correct
format but I guess not.
Is there another program that does?...maybe run.exe isn't the way to go.


Instead of 'nedit', you could run.exe a script that looks something like:

nedit $(cygpath -u "$1")

--
Matthew
People say I'm going insane. I say, "what do you mean, 'going'?".


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

2007-08-08 Thread JorWong

I'm using Bloodshed Dev-C++, the latest version of Cygwin, and the PortAudio
API. I put the PortAudio .tar in my /usr/src folder and ran the following
commands:

$ cd /usr/src
$ tar zxf pa_snapshot_v19.tar.gz
$ cd portaudio
$ autoconf
$ ./configure --disable-static
$ make
$ make install

Cygwin says installation was successful, but when I take the files from
/usr/local and put them in the appropriate folders in the Dev-C++ directory,
I still get multiple linker errors when trying to compile a PortAudio
program. 
-- 
View this message in context: 
http://www.nabble.com/Cygwin-and-PortAudio-tf4237007.html#a12055263
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: cron

2007-08-08 Thread Pierre A. Humblet

- Original Message - 
From: "Kiran, Shashi" 
To: 
Sent: Wednesday, August 08, 2007 10:40 AM
Subject: cron


Hi,

I 'm trying to schedule a shell script on cygwin using cron. No matter
what
I do I don't seem to get the cron job executing my bash script.

My script is temp.sh

echo `date` > /home/test/temp.log

crontab -e is having the following details

* * * * * sh /home/test/temp.sh > /home/test/temp.sh.err 2>&1

I did use the paths in the script itself and I also used the windows
path
where the cygwin installed(/cygdrive/d/cygwin/).

I also tried using the following by editing the crontab:

* * * * * date > /home/test/date.txt

Still not working. I don't have administrator login. I ran the
cron_diagnose.sh and it din't give me any errors.

Please find the attached cronbug.txt

*
1- cronbug shows that the cron daemon is running fine as yourself ("test").
2- You are in the Administrators group.
3- You are running interactively in Terminal Service session on a Windows 2003 
Server.
   I have never tested that setup, but I see that you have sshd and exim (which 
is stopped)
   under privileged accounts. Any problem there?
4- Your crontab file has a PATH that does not include the Windows directory,
  which may cause problems (not sure). Removing that line can't hurt.
5- There are no cron entries in the Windows event log. This is strange. Can you 
verify
that fact by looking the Windows application event log yourself?
6- /usr/sbin/sendmail  is linked to exim.
  Are there any messages in /var/spool/mail/test or any entries is 
/var/log/exim/exim_main.log ?

So the only strange things are 5 and (presumably) that there is no 
/home/test/date.txt
Please look at 6 and 5 for clues and try 4 .

If the sshd server works fine, try to rerun cron-config to not run cron as 
yourself. It should
then setup cron to run under the sshd_server account.
Let us know...

Pierre



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



Using malloc/realloc along with gdb: heap overflows

2007-08-08 Thread Eric Belanger
Hi group,

I'm on my way to learn C using Cygwin (along with the GCC tools) as my
development setup, and it seems that gdb somewhat fails at
reallocating some memory. I have trimmed down my bug to a minimum so I
can test it on other situations, but here's what i've found so far.

- Using gdb warns about heap leaking, SIGTRAPs, then SIGSEGVs if I
choose to continue anyway;
- Simply running the program (in a DOS box) doesnt produce any crashes
or errors, and outputs what I expected
- If I use Debian (Etch), there is no problems at all (even when
running thru gdb) - everything goes as expected.

Here's what gdb warns about:

 Snippet 

warning: HEAP[testcase.exe]:
warning: Heap block at 003D3FE0 modified at 003D3FEA past requested size of 2


Program received signal SIGTRAP, Trace/breakpoint trap.
0x7c911231 in ntdll!DbgUiConnectToDbg ()
   from /cygdrive/c/WINDOWS/system32/ntdll.dll
(gdb) c
Continuing.
warning: HEAP[testcase.exe]:
warning: Invalid Address specified to RtlReAllocateHeap( 003D, 003D3FE8 )


Program received signal SIGTRAP, Trace/breakpoint trap.
0x7c911231 in ntdll!DbgUiConnectToDbg ()
   from /cygdrive/c/WINDOWS/system32/ntdll.dll
(gdb) c
Continuing.
String: (null)

Program received signal SIGSEGV, Segmentation fault.
0x77c1794a in strncat () from /cygdrive/c/WINDOWS/system32/msvcrt.dll

 /Snippet 

Heres my trimmed down test case:

 Code 
#include 
#include 
#include 

#define TCP_BUFSIZE 2

int main(int argc, char *argv) {
/* *bufdata and *alldata were part of a recv() winsock procedure, fyi  */
char *bufdata = malloc(sizeof(char)* (TCP_BUFSIZE / 2));
int datasize = TCP_BUFSIZE;
int numbytes = 0;

char *alldata = malloc(sizeof(char)*datasize);
memset(alldata,0,strlen(alldata));

char *teststring = "Just testing realloc and stuff, long string
blah blah blah.";
char *testptr, *tempdata;
int i,tslen = strlen(teststring);

/* copying teststring to alldata by increments of TCP_BUFSIZE ,
verifying that alldata doesnt get overflowed in the process. */
for (testptr = teststring,i = 0;i < tslen;testptr = testptr +
TCP_BUFSIZE,i += 2) {
alldata = strncat(alldata,testptr,TCP_BUFSIZE);
if (strlen(alldata) >= datasize) {
datasize *= 2;
/* Should check realloc result, but lets keep the 
testcase simple. */
alldata = realloc(alldata,datasize);
}
printf("String: %s\n",alldata);
}
printf("\nFinal Result: %s",alldata);
return 0;
}

 /Code 

Since i'm quite new about c programming in general, I fear I may have
missed something crucial (feel free to refer me to some docs if it's
the case); but since the ML archive mentionned a few times about
cygwin's gdb memory management issues AND the testcase working on
Linux, i'm not quite sure of the cause of the problem, hence this
e-mail.

Any clues?

Thanks in advance!

- Eric Belanger -- [EMAIL PROTECTED]

--
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: Re: nedit windows integration

2007-08-08 Thread Frederich, Eric P21322
Matthew Woehlke Wrote :
> Instead of 'nedit', you could run.exe a script that looks 
> something like:
> 
> nedit $(cygpath -u "$1")

I get an error "Can't open /usr/X11R6/bin/$(cygpath:..."
Can't read the entire error because it is in an unsizeable window.

--
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: nedit windows integration

2007-08-08 Thread Matthew Woehlke

Frederich, Eric P21322 wrote:

Matthew Woehlke Wrote :
Instead of 'nedit', you could run.exe a script that looks 
something like:


nedit $(cygpath -u "$1")


I get an error "Can't open /usr/X11R6/bin/$(cygpath:..."
Can't read the entire error because it is in an unsizeable window.


...did you put it in a script, or try to feed it to 'run.exe' directly? 
It looks like you did the latter.


"you could run.exe --> *a script* that looks something like... <--"

You need to create a script (say, 'my-launch-nedit.sh') and call run.exe 
on that instead. The sample script I gave will call 'cygpath' on the 
first argument and feed the result to nedit.


Hmm, also, a minor correction:
nedit "$(cygpath -u "$1")" # note added quotes

--
Matthew
People say I'm going insane. I say, "what do you mean, 'going'?".


--
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 man pages

2007-08-08 Thread Williams, Gerald S (Jerry)
Brian Dessent wrote:
> The idea behind texinfo is a format-independent way of writing
> documentation.  'info' is just one of a million ways to view this same
> documentation. [...]

Yes, especially for make, I've found the info files to be the best
reference, and they're easily navigable. I'm in the "mildly tolerate"
category for the info viewer, however. I mostly use tkinfo (easily
googled) to browse info files.

However (bringing the discussion back on-topic for the list), I had to
make some tweaks to tkinfo to get it to run properly under Cygwin. The
main issue was with the commands used to automatically decompress info
files. Cygwin implements zcat and gunzip as shell scripts, and (for me
at least) the Tcl interpreter didn't handle them properly. I've been
assuming this is because wish isn't really a Cygwin executable.

Anyway, you simply need to change the value of tki(compresscat-*) to
use "gzip -d -c" rather than zcat/gunzip. The following shows what I
changed for TkInfo version 2.8:

$ diff -u orig/tkinfo-2.8/tkinfo tkinfo-2.8/tkinfo 
--- orig/tkinfo-2.8/tkinfo  2004-03-22 19:56:39.0 -0400
+++ tkinfo-2.8/tkinfo   2007-08-08 12:23:36.85625 -0400
@@ -562,9 +562,12 @@
 set tki(self)  [info script]
 set tki(timestatusB)   0
 set tki(iconic) 0
-set tki(compresscat-Z) "zcat"
-set tki(compresscat-z) "gunzip -c"
-set tki(compresscat-gz)"gunzip -c"
+# set tki(compresscat-Z)   "zcat"
+# set tki(compresscat-z)   "gunzip -c"
+# set tki(compresscat-gz)  "gunzip -c"
+set tki(compresscat-Z) "gzip -d -c"
+set tki(compresscat-z) "gzip -d -c"
+set tki(compresscat-gz)"gzip -d -c"
 set tki(compresscat-bz2)"bunzip2 -c"
 set tki(rawHeadersB)   [option get . showheaders Showheaders]
 set tki(showButtonsB)  [option get . showbuttons Showbuttons]

I also found that it helps to customize the Tkinfo settings in your
.Xdefaults file. In particular, the default fonts looked pretty bad
for me in Cygwin. Here's how I set them:

Tkinfo*font:{Tahoma} 9
Tkinfo*Text.font:   {Lucida Console} 12

-Jerry

--
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: Using malloc/realloc along with gdb: heap overflows

2007-08-08 Thread Frodak Baksik
See comments below...

On 8/8/07, Eric Belanger  wrote:

>  Code 
> #include 
> #include 
> #include 
>
> #define TCP_BUFSIZE 2
>
> int main(int argc, char *argv) {
> /* *bufdata and *alldata were part of a recv() winsock procedure, fyi  */
> char *bufdata = malloc(sizeof(char)* (TCP_BUFSIZE / 2));
> int datasize = TCP_BUFSIZE;
> int numbytes = 0;
>
> char *alldata = malloc(sizeof(char)*datasize);
> memset(alldata,0,strlen(alldata));

This is dangerous.  This can attempt to set a random amount of memory
to zero.  The problem is with the use of strlen to determine the
number of bytes.  If the memory block that alldata doesn't contain a
'\0' then strlen will return with a size larger then what was passed
to malloc.

If you want alldata to be initialized try calloc, or use memset with a
fixed size.
If you want alldata to be the empty string, try this instead.
alldata[0] = '\0';

>
> char *teststring = "Just testing realloc and stuff, long string
> blah blah blah.";
> char *testptr, *tempdata;
> int i,tslen = strlen(teststring);
>
> /* copying teststring to alldata by increments of TCP_BUFSIZE ,
> verifying that alldata doesnt get overflowed in the process. */
> for (testptr = teststring,i = 0;i < tslen;testptr = testptr +
> TCP_BUFSIZE,i += 2) {
> alldata = strncat(alldata,testptr,TCP_BUFSIZE);

This causes a buffer overflow on the first iteration of the loop.
strncat ALWAYS appends a null, ie. this appends 3 characters each
time, alldata was initially malloc'd for 2 char.

> if (strlen(alldata) >= datasize) {
> datasize *= 2;
> /* Should check realloc result, but lets keep the 
> testcase simple. */
> alldata = realloc(alldata,datasize);
> }

This buffer size check should be done before you copy data into the
buffer, lest you overflow the buffer first and then grow it in size.
In general the null terminator of the string is usually just outside
the memory space allocated for the buffer.

> printf("String: %s\n",alldata);
> }
> printf("\nFinal Result: %s",alldata);
> return 0;
> }
>
>  /Code 

Depending upon what buffer size malloc returns and what data you are
stomping on this may or may not run as expected.

--
Frodak

--
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.20-1, spinning pdksh, 100% CPU

2007-08-08 Thread Ernie Coskrey
> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Ernie Coskrey
> Sent: Tuesday, July 31, 2007 3:40 PM
> To: cygwin@cygwin.com
> Subject: cygwin 1.5.20-1, spinning pdksh, 100% CPU
> 
>  
> I've run into a problem with cygwin 1.5.20-1 and pdksh 
> 5.2.14.  We've got a pdksh.exe process that is spinning, 
> using all the CPU.
>  
> This scenario is very hard to reproduce, but has happened on 
> our test systems occasionally.  It occurred recently, and I 
> currently have gdb attached to the process and have the 
> symbols loaded.  I see that pdksh is continually calling 
> "sigsuspend()", which is immediately returning from 
> cancelable_wait due to the fact that the signal_arrived event 
> is set.  I also see that pdksh is waiting for a subprocess to 
> complete, and has a handle to the PID of that process - 
> however the process has long since terminated.
>  
> It appears that something went wrong during delivery of SIGCHLD.
>  
> I've got two questions related to this:
>  
> - have there been changes between 1.5.20-1 and 1.5.24-2, or 
> the latest snapshot, that might have fixed this issue?  We've 
> done some limited testing with 1.5.24-2 and haven't seen this 
> happen yet, but as I said the it only happens rarely.
> - is there anything I can look at in gdb to help identify 
> what the issue is?
>  
> Any suggestions would be appreciated!
>  
> -
> Ernie Coskrey 

I've discovered an interesting piece of information that I think is
related to this.  I'm hoping this might ring a bell with someone on the
list.

Looking at _main_tls->stack[], when I've set a breakpoint in
handle_sigsuspend just after the cancelable_wait() call, I see the
following entries:

0x6109186f  0x4132ac

0x6109186f is "sigdelayed()", which is the routine that should have been
called to deliver the signal and reset the signal_arrived event.
0x4132ac is j_waitj (in pdksh).

So, somehow, when this problem occurs, "sigdelayed" gets pushed onto the
stack *before* j_waitj does.  So, _sigbe never calls sigdelayed.

I don't think there's ever a case where sigdelayed should be at
_main_tls->stack[0].  However this happened is, I believe, the cause of
this problem.

Ernie Coskrey

--
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: HEADS UP:Problem with svn under latest snapshot.

2007-08-08 Thread Joe Smith


"Thomas Berger" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]


It could be a matter of interference with TortoiseSVN.


No. It could not. I don't have tortoiseSVN.



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



Creating a dll in cygwin for use with jni without -mno-cygwin

2007-08-08 Thread robbincatz

I am trying to create a dll in cygwin for use with jni.  I have successfully
achieved this for a simple "hello world" type program using the following
command:

gcc -mno-cygwin -Wl,--add-stdcall-alias -shared -o myDll.dll myNativeCode.c

However I would like to create my dll without using the -mno-cygwin option
as my c code relies on additional C libraries which when included causes the
above command to produce a large number of errors involving the libraries I
am using:

/usr/local/lib/libpbc.a(libpbc_la-pairing.o): In function
`pairing_init_inp_gene
ric':
/home/me/pbc_build/pbc-0.4.11/ecc/pairing.c:80: undefined reference to
`___asse
rt'
/home/me/pbc_build/pbc-0.4.11/ecc/pairing.c:81: undefined reference to
`___asse
rt'
/home/me/pbc_build/pbc-0.4.11/ecc/pairing.c:147: undefined reference to
`___get
reent'
/usr/local/lib/libpbc.a(libpbc_la-pairing.o): In function
`pairing_init_inp_buf'
.
.
.
.
.
.
/usr/local/lib/libgmp.a(assert.o):assert.c:(.text+0x29): undefined reference
to
`___getreent'
/usr/local/lib/libgmp.a(assert.o):assert.c:(.text+0x4b): undefined reference
to
`___getreent'
/usr/local/lib/libgmp.a(assert.o):assert.c:(.text+0x98): undefined reference
to
`___getreent'
/usr/local/lib/libgmp.a(doprntf.o):doprntf.c:(.text+0x483): undefined
reference
to `__imp___ctype_'
collect2: ld returned 1 exit status

( I have just given the start and end of the errors produced )

I have looked at every bit of information on -mno-cygwin, building dlls in
cygwin and jni but nothing has helped although I now believe the problem
lies with the fact that i did not install my libraries for mingw but for
cygwin.

If I could create my dll without the -mno-cygwin option I think it would
solve my problem, I have tried with no success to do this.  When I try this
everything appears to be fine ( i.e. I receive no error messages ) but when
I run my java code ( which calls the native c code ) it hangs, this happens
even for the most basic "hello world" ap.  

My code is as follows:

main.java:

public class main
{
static 
{
System.loadLibrary( "theNativeMethod" );
}

public static void main( String args[] )
{
AClassWithNativeMethods c = new AClassWithNativeMethods();
c.theNativeMethod();
}
}
 

AClassWithNativeMethods.java:

public class AClassWithNativeMethods
{
public native void theNativeMethod();

public void aJavaMethod()
{
theNativeMethod();
}
}

AClassWithNativeMethods.h:

/* DO NOT EDIT THIS FILE - it is machine generated */
#include 
/* Header for class AClassWithNativeMethods */

#ifndef _Included_AClassWithNativeMethods
#define _Included_AClassWithNativeMethods
#ifdef __cplusplus
extern "C" {
#endif
/*
 * Class: AClassWithNativeMethods
 * Method:theNativeMethod
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_AClassWithNativeMethods_theNativeMethod
  (JNIEnv *, jobject);

#ifdef __cplusplus
}
#endif
#endif


theNativeMethod.c:

#include 
#include "AClassWithNativeMethods.h"

JNIEXPORT void JNICALL Java_AClassWithNativeMethods_theNativeMethod( JNIEnv*
env, jobject thisObj )
{
printf( "Hello JNI World\n" );
}


I used the following to compile and run my java code:
 javac AClassWithNativeMethods.java main.java
 javah -jni AClassWithNativeMethods
 java main

I would really appreciate any help in producing a dll which works and doesnt
use the -mno-cygwin option.  Or any other suggestions

Thanks

:)
-- 
View this message in context: 
http://www.nabble.com/Creating-a-dll-in-cygwin-for-use-with-jni-without--mno-cygwin-tf4238762.html#a12060945
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: Using malloc/realloc along with gdb: heap overflows

2007-08-08 Thread Brian Dessent

> 0x77c1794a in strncat () from /cygdrive/c/WINDOWS/system32/msvcrt.dll

This means that you built this testcase with MinGW or with -mno-cygwin,
which means that these implementations of malloc, realloc, etc. are
handled by the Microsoft C library (MSVCRT).  You essentially are not
using any part of Cygwin here, so any behavior of the heap and/or memory
allocation and/or any other standard C funtion that you call is not our
code that's running, so it's pretty much off-topic for this list.  The
MinGW list might be better.

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: Creating a dll in cygwin for use with jni without -mno-cygwin

2007-08-08 Thread Brian Dessent
robbincatz wrote:

> I have looked at every bit of information on -mno-cygwin, building dlls in
> cygwin and jni but nothing has helped although I now believe the problem
> lies with the fact that i did not install my libraries for mingw but for
> cygwin.

Using -mno-cygwin makes a MinGW application/DLL.  It is the same as
using the MinGW gcc.  You can't link together MinGW libraries and Cygwin
libraries into the same output, so you would need a MinGW version of
every library that your application links to in order to use
-mno-cygwin.

> If I could create my dll without the -mno-cygwin option I think it would
> solve my problem, I have tried with no success to do this.  When I try this
> everything appears to be fine ( i.e. I receive no error messages ) but when
> I run my java code ( which calls the native c code ) it hangs, this happens
> even for the most basic "hello world" ap.

The problem here is that you're loading the Cygwin1.dll library
dynamically, as opposed to linking against it normally.  Special steps
are required to do this because the Cygwin library has special
initialization needs to set up the TLS area at the bottom of the stack
for its signal emulation.  This is handled automatically by the crt
startup objects in a normal Cygwin binary, but when you just call
LoadLibrary in a non-Cygwin application you have to handle it yourself.

This is covered in the FAQ:
. 
The best reference to how to do this is the cygload.cc example in the
testsuite.

I have no idea how you'd handle this stack requirement in a java
application, other than writing your own initialization procedure that
saves a copy of the bottom 4k, initializes Cygwin, and then restores the
saved parts.  However for this to work (as opposed to the other strategy
of making sure that the 4k is actually reserved as early in the
initialization process as possible) it means your cleanup/deinit code
has to be run before the stack gets unwound down to that part of it that
you smashed away.

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: HEADS UP:Problem with svn under latest snapshot.

2007-08-08 Thread Christopher Faylor
On Wed, Aug 08, 2007 at 03:58:37PM -0400, Joe Smith wrote:
> "Thomas Berger" <[EMAIL PROTECTED]> wrote in message 
> news:[EMAIL PROTECTED]
>>
>>It could be a matter of interference with TortoiseSVN.
>>
>No.  It could not.  I don't have tortoiseSVN.

It's probably related to Corinna's changes to rename().  She'll probably
have something to say about that soon.

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: Creating a dll in cygwin for use with jni without -mno-cygwin

2007-08-08 Thread Brian Dessent
Brian Dessent wrote:

> [...] your own initialization procedure that
> saves a copy of the bottom 4k, initializes Cygwin, and then restores the
> saved parts.

Just to be clear, I don't mean that it should initialize Cygwin and then
restore those parts of the stack.

To put it differently, when Cygwin initializes it expects to have free
reign of the bottom X bytes of the stack for its own use.  You can
accomplish this two ways: 

The designed way - have code that runs very early in the sequence of
process initialization that simply allocates these bytes on the stack
like a standard C auto variable, and since the stack is nearly empty
they will be at the bottom.  This is what the Cygwin startup code
(crt0.o) does when you run a Cygwin binary, and how it is designed to
work.

The "fake it" way - Assume that you want to load the Cygwin DLL
dynamically at runtime, and the stack has already been robustly
allocated/populated by whatever application is already running.  You
have no control over the bottom X bytes, so you're kind of screwed.  The
best you can hope to do is make a copy of those X bytes, then initialize
Cygwin (which now "owns" that area and will overwrite whatever's there
with its own data) and hope that the control flow of the application is
such that you will be able to unload the Cygwin DLL and restore those
saved bytes before program flow reaches a point where the stack gets
unwound down to that earliest frame.

If you don't take care of the deinitialization and restoration part then
everything will seem right but your application will probably crash and
die horribly when it terminates.

Obviously the key here is that you need to run this initialization code
as early in the process init as possible.  If I recall right the cygload
code tries to do this right at the beginning of main() and at that point
there is only a small amount of data at the bottom of the stack to
save/restore, which also means the best chances of that data not being
referenced/used before it is restored.

[ X is sizeof(_cygtls) which has traditionally been less than 4K so 4K
is a nice round number but the current cygload actually uses 32k for a
safety margin, so the docs should be updated. ]

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/



[ANNOUNCEMENT] Updated: brltty 3.8-3

2007-08-08 Thread Samuel Thibault
Version 3.8-3 of "brltty" has been uploaded.

It is a background process (daemon) providing access to the Windows
Console for a blind person using a refreshable braille display.

--  brltty-3.8-3 -- 2007-08-06 ---
Update to subversion 3168 for getting the upstream WINDOW -> __MINGW32__
change, as well as misc fixes.

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/



PERL's Encode::Byte is being flagged by AVGfree as WIN32/PolyCrypt anyonelse

2007-08-08 Thread William Deegan
Anyone else seeing this?
I've done an uninstall, removed the saved downloads from setup.
Then installed them again.
Same issue.

-Bill

--
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: PERL's Encode::Byte is being flagged by AVGfree as WIN32/PolyCrypt anyonelse

2007-08-08 Thread Reini Urban

William Deegan schrieb:

Anyone else seeing this?
I've done an uninstall, removed the saved downloads from setup.
Then installed them again.
Same issue.


Which file exactly?
There is /usr/lib/perl5/5.8/cygwin/Encode/Byte.pm
or /usr/lib/perl5/5.8/cygwin/auto/Encode/Byte/*.dll*

I have no such virus on my machine which could have make it into the distro.
AVGFree is wrong.

$ clamscan /usr/lib/perl5/5.8/cygwin/auto/Encode/Byte/Byte.dll \
   /usr/lib/perl5/5.8/cygwin/auto/Encode/Byte/libByte.dll.a \
   /usr/lib/perl5/5.8/cygwin/Encode/Byte.pm

/usr/lib/perl5/5.8/cygwin/auto/Encode/Byte/Byte.dll: OK
/usr/lib/perl5/5.8/cygwin/auto/Encode/Byte/libByte.dll.a: OK
/usr/lib/perl5/5.8/cygwin/Encode/Byte.pm: OK

--- SCAN SUMMARY ---
Known viruses: 143206
Engine version: 0.91.1
Scanned directories: 0
Scanned files: 3
Infected files: 0
Data scanned: 0.15 MB
Time: 3.280 sec (0 m 3 s)

$ clamscan -V
ClamAV 0.91.1-exp/3904/Thu Aug  9 02:01:48 2007
--
Reini Urban
http://phpwiki.org/  http://murbreak.at/
http://helsinki.at/  http://spacemovie.mur.at/

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

2007-08-08 Thread Reini Urban

JorWong schrieb:

I'm using Bloodshed Dev-C++, the latest version of Cygwin, and the PortAudio
API. I put the PortAudio .tar in my /usr/src folder and ran the following
commands:

$ cd /usr/src
$ tar zxf pa_snapshot_v19.tar.gz
$ cd portaudio
$ autoconf
$ ./configure --disable-static
$ make
$ make install

Cygwin says installation was successful, but when I take the files from
/usr/local and put them in the appropriate folders in the Dev-C++ directory,
I still get multiple linker errors when trying to compile a PortAudio
program. 


Linking Dev-C++ to a cygwin library will not work.
You might want to ask the pd-devel at iem.at list. They use mingw and MSVC6.

http://lists.puredata.info/pipermail/pd-dev/2006-07/007212.html

--
Reini Urban
http://phpwiki.org/  http://murbreak.at/
http://helsinki.at/  http://spacemovie.mur.at/

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