Inter-Process Mutexes

2006-09-04 Thread Drake Baker

Gentlemen,

I have seen conflicting information on the web concerning inter-process 
mutexes in CYGWIN.  I have seen outright statements that it is not 
supported, and I have seen statements that ALL mutexes are inter-process by 
default.  Obviously, only one statement is currently correct.


The bottom line is that I have some shared memory and multiple processes -- 
basically a critical section.  I need a technique to implement the critical 
section, and preferably a solution that is portable.


I have tried for countless hours over the last few days before concluding 
that process shared mutexes don't exist in CYGWIN despite some google 
results implying they do.  (I hope I am wrong, and it does support them).


Any solution that will work in CYGWIN and a Linux box would be appreciated 
-- all I need is a critical section for mutliple processes.


Thank you in advance for your help!

-Drake

--- snippets for reference, in case my assumption is wrong (not actual code, 
simplified cuts)


... initializing
pthread_mutexattr_init(mattr); // create default attributes, returns no 
error


pthread_mutexattr_setpshared(mattr, PTHREAD_PROCESS_SHARED); // set for 
inter-process sharing (it is returning EINVAL)


pthread_mutex_init(mutex, mattr);  // init, returns no error

... locking/etc...

pthread_mutex_lock(mutex) // returns no error in process that init'd mutex, 
EINVAL in other processes


_
Get real-time traffic reports with Windows Live Local Search  
http://local.live.com/default.aspx?v=2cp=42.336065~-109.392273style=rlvl=4scene=3712634trfc=1



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



sudden error: proc magic mismatch detected

2006-09-04 Thread Banibrata Dutta

Hi,

I'd been using Cygwin on my PC w/o problems (for about 4 months),
until yesterday night. Today morning I get this error...

$ startx
C:\cygwin\usr\X11R6\bin\xinit.exe (2556): *** proc magic mismatch detected -
0x19C16FB6/0xD079E02.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start-Find/Search facility
and delete all but the most recent version.  The most recent version
*should* reside in x:\cygwin\bin, where 'x' is the drive on which you
have installed the cygwin distribution.  Rebooting is also suggested
if you are unable to find another cygwin DLL.

If some has a clue as to how to fix this, please lemme know.  I've
reinstalled cygwin from a ISO image (which was used to install my
previous setup as well).

thanks,
bd

--
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: sudden error: proc magic mismatch detected

2006-09-04 Thread Dave Korn
On 04 September 2006 08:41, Banibrata Dutta wrote:

 I'd been using Cygwin on my PC w/o problems (for about 4 months),
 until yesterday night. Today morning I get this error...
 
 $ startx
 C:\cygwin\usr\X11R6\bin\xinit.exe (2556): *** proc magic mismatch detected -
 0x19C16FB6/0xD079E02.
 This problem is probably due to using incompatible versions of the cygwin
 DLL. Search for cygwin1.dll using the Windows Start-Find/Search facility
 and delete all but the most recent version.  The most recent version
 *should* reside in x:\cygwin\bin, where 'x' is the drive on which you
 have installed the cygwin distribution.  Rebooting is also suggested
 if you are unable to find another cygwin DLL.
 
 If some has a clue as to how to fix this, please lemme know.

  Well, it is possible that you are using incompatible versions of the cygwin
DLL.  You could find out by searching for cygwin1.dll using the Windows
Start-Find/Search facility and deleting all but the most recent version.

  BTW, the most recent version *should* reside in x:\cygwin\bin, where 'x' is
the drive on which you have installed the cygwin distribution.

  Oh, apparently, rebooting is also suggested if you are unable to find
another cygwin DLL.

   I've
 reinstalled cygwin from a ISO image (which was used to install my
 previous setup as well).

  Sounds like you've probably ended up with incompatible versions of the
cygwin
DLL.  

 Problem reports:   http://cygwin.com/problems.html

  If you were to send the output from cygcheck - as an attachment please - as
it describes on the problem reporting page, it might well show us how many
versions of the cygwin dll you have.


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/



Problem with rpcgen

2006-09-04 Thread Memarovic Nemanja
Hi,
 
I'm new to cygwin. I'm trying to use it but I have problem with rpcgen. It wont 
geberate needed classes for RPC communication.
 
When I run rpcgen demo.x I receive this error message:
 
execl: No such file or directory
execl: No such file or directory
execl: No such file or directory
execl: No such file or directory
 
But demo.x is in this directory ()root/home directory).
 
I have installed sun rpc package from libs category and expect which is in 
Interpreters category. I'm using Windows XP.
 
Any suggestions?
 
Thanx,
 
Nemanja

--
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: sudden error: proc magic mismatch detected

2006-09-04 Thread Banibrata Dutta

Thanks a lot Dave. The cygcheck -s -v -r  cygcheck.out  did the
trick. Using it's output I figured that somehow, from somewhere a
second cygwin1.dll had got installed in C:\WINDOWS\system32\ folder.
It didn't showup in the result of file-search, probably because search
ignores system-files. Removing the duplicate .ddl fixed this issue.

Thanks again.

regards,
bd

On 9/4/06, Dave Korn [EMAIL PROTECTED] wrote:

On 04 September 2006 08:41, Banibrata Dutta wrote:

 I'd been using Cygwin on my PC w/o problems (for about 4 months),
 until yesterday night. Today morning I get this error...

 $ startx
 C:\cygwin\usr\X11R6\bin\xinit.exe (2556): *** proc magic mismatch detected -
 0x19C16FB6/0xD079E02.
 This problem is probably due to using incompatible versions of the cygwin
 DLL. Search for cygwin1.dll using the Windows Start-Find/Search facility
 and delete all but the most recent version.  The most recent version
 *should* reside in x:\cygwin\bin, where 'x' is the drive on which you
 have installed the cygwin distribution.  Rebooting is also suggested
 if you are unable to find another cygwin DLL.

 If some has a clue as to how to fix this, please lemme know.

 Well, it is possible that you are using incompatible versions of the cygwin
DLL.  You could find out by searching for cygwin1.dll using the Windows
Start-Find/Search facility and deleting all but the most recent version.

 BTW, the most recent version *should* reside in x:\cygwin\bin, where 'x' is
the drive on which you have installed the cygwin distribution.

 Oh, apparently, rebooting is also suggested if you are unable to find
another cygwin DLL.

   I've
 reinstalled cygwin from a ISO image (which was used to install my
 previous setup as well).

 Sounds like you've probably ended up with incompatible versions of the
cygwin
DLL.

 Problem reports:   http://cygwin.com/problems.html

 If you were to send the output from cygcheck - as an attachment please - as
it describes on the problem reporting page, it might well show us how many
versions of the cygwin dll you have.


   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/





--

Diamond is a piece of coal that did well under pressure.

--
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: Inter-Process Mutexes

2006-09-04 Thread Václav Haisman
Drake Baker wrote:
 Gentlemen,
 
 I have seen conflicting information on the web concerning inter-process
 mutexes in CYGWIN.  I have seen outright statements that it is not
 supported, and I have seen statements that ALL mutexes are inter-process
 by default.  Obviously, only one statement is currently correct.
 
 The bottom line is that I have some shared memory and multiple processes
 -- basically a critical section.  I need a technique to implement the
 critical section, and preferably a solution that is portable.
 
 I have tried for countless hours over the last few days before
 concluding that process shared mutexes don't exist in CYGWIN despite
 some google results implying they do.  (I hope I am wrong, and it does
 support them).
 
 Any solution that will work in CYGWIN and a Linux box would be
 appreciated -- all I need is a critical section for mutliple processes.
 
 Thank you in advance for your help!
 
 -Drake
 
 --- snippets for reference, in case my assumption is wrong (not actual
 code, simplified cuts)
 
 ... initializing
 pthread_mutexattr_init(mattr); // create default attributes, returns no
 error
 
 pthread_mutexattr_setpshared(mattr, PTHREAD_PROCESS_SHARED); // set for
 inter-process sharing (it is returning EINVAL)
 
 pthread_mutex_init(mutex, mattr);  // init, returns no error
 
 ... locking/etc...
 
 pthread_mutex_lock(mutex) // returns no error in process that init'd
 mutex, EINVAL in other processes
Cygwin has System V semaphores and shared memory. You can use that.

--
VH



signature.asc
Description: OpenPGP digital signature


libungif and emacs-cvs

2006-09-04 Thread Angelo Graziosi


Building emacs-cvs, 'configure' gives:


checking gif_lib.h usability... yes
checking gif_lib.h presence... yes
checking for gif_lib.h... yes
checking for EGifPutExtensionLast in -lungif... no
---

so that it buids without ungif support:


...
Configured for `i686-pc-cygwin'.

  Where should the build process find the source code?/tmp/emacs
  What operating system and machine description files should Emacs use?
`s/cygwin.h' and `m/intel386.h'
  What compiler should emacs be built with?   gcc -g -O2 
  Should Emacs use the GNU version of malloc? yes
  Should Emacs use a relocating allocator for buffers?yes
  Should Emacs use mmap(2) for buffer allocation? no
  What window system should Emacs use?x11
  What toolkit should Emacs use?  LUCID
  Where do we find X Windows header
files?/usr/X11R6/include
  Where do we find X Windows libraries?   /usr/X11R6/lib
  Does Emacs use -lXaw3d? yes
  Does Emacs use -lXpm?   yes
  Does Emacs use -ljpeg?  yes
  Does Emacs use -ltiff?  yes
  Does Emacs use -lungif? no=== 
  Does Emacs use -lpng?   yes
  Does Emacs use X toolkit scroll bars?   yes
...


I do not remember this behaviour previously (but it could be), so I flag
this in the case it is a problem with libungif.

Emacs-cvs requestes libungif 4.1.0b1 or higher and I have installed
libungif, libungif4 packages 4.1.4

I have all Cygwin installed and updated.



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: libungif and emacs-cvs

2006-09-04 Thread Igor Peshansky
On Mon, 4 Sep 2006, Angelo Graziosi wrote:

 Building emacs-cvs, 'configure' gives:

 
 checking gif_lib.h usability... yes
 checking gif_lib.h presence... yes
 checking for gif_lib.h... yes
 checking for EGifPutExtensionLast in -lungif... no
  ^^
 ---

 so that it buids without ungif support:

It would probably be enlightening to look at config.log to see *why*
configure thinks EGifPutExtensionLast is not in -lungif...

 I do not remember this behaviour previously (but it could be), so I flag
 this in the case it is a problem with libungif.

Or something else completely unrelated that caused the test program to
fail, thus making configure think that it didn't have a valid -lungif.
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

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

2006-09-04 Thread Larry Hall (Cygwin)

Memarovic Nemanja wrote:

Hi,
 
I'm new to cygwin. I'm trying to use it but I have problem with rpcgen. It wont geberate needed classes for RPC communication.
 
When I run rpcgen demo.x I receive this error message:
 
execl: No such file or directory

execl: No such file or directory
execl: No such file or directory
execl: No such file or directory
 
But demo.x is in this directory ()root/home directory).
 
I have installed sun rpc package from libs category and expect which is in Interpreters category. I'm using Windows XP.
 
Any suggestions?



As always:


Problem reports:   http://cygwin.com/problems.html



Without this information, we're left here with WAGs.  Mine is that demo.x
isn't found because you didn't specify the full path and the directory it's
in isn't in your path.


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

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



No mails with executable attachements to BMBWK

2006-09-04 Thread do_not_reply
Aus sicherheitstechnischen Gründen ist der Versand von ausfuehrbaren Dateien an 
das BMBWK gesperrt.

Sender: cygwin@cygwin.com
Recipient(s): [EMAIL PROTECTED]
Subject: Re: Message Error
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/

RE: bash processes defunct after ssh session disconnection

2006-09-04 Thread burning shadow

Is there a chance this issue will be solved?

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



Variation on: regular user, bash cannot find /tmp

2006-09-04 Thread David LaFrance-Linden
I found a few similar problems in your mail archives, but I did not quickly
find the problem I'm having.  Attached is cygcheck output as requested.

A few days ago, as a normal user on my MS Windows box, I went to cygwin.com
and ran setup.exe to install things, for just me.  Everything seemed to go
OK.  When I ran the shortcut, it brought up a bash.  First time up it did
some setup.  Things worked.

Then I decided to install it for everyone.  I deleted all the cygwin stuff I
could find from my directories.  Then, from an Admin account, I went to
cygwin.com again, ran setup.exe again, and chose For everyone and put
things under c:\cygwin.

Again, everything seemed to go OK.  But when I, as the original user, try
the newly installed shortcut on my desktop, I get 

bash.exe: warning: could not find /tmp, please create!
bash-3.1$

complaint.  The other reports I found seem to indicate it gets further than
I get.

At first, I thought the entire installation must have gone south, somehow.
But... if I login as a different (and non-admin) user, the first time I
click on the Cygwin shortcut on that different user's desktop, it does its
first-time bash setup and works.

I've been trying to find some file or some shred of data that got left over
and undeleted from my first (and personal) installation that could be
polluting or distracting the for-everyone installation.  

I've tried running the batch commands by hand from a command shell, with the
same result.  Is there an option to bash to have it dump out a lot more of
what it is doing.  I already tried -v.

`pwd` indicates I'm in /usr/bin.  But no commands seem to work.  

`echo ~` indicates I'm in my Windows homedir, not my cygwin homedir, and
this is a difference with the other users.  But how and/or why?  And how to
I fit it?

I can't seem to run any non-builtin program; I always get file not found,
even with explicit pathnames, absolute and relative to `pwd`.

I was able to do `set  ~/foo.txt` from as me (David) and have attached that
as well.

Also attached (the ...2 versions) are the cygcheck and set from a user that
works.  Maybe somebody can find the crucial difference and tell me how to
fix it?

I use Linux daily for work; my Windows skills are minimal.

Any clues?
Thanks,
David
[EMAIL PROTECTED]




cygcheck.out
Description: Binary data
!::='::\'
!C:='C:\cygwin\bin'
ALLUSERSPROFILE='C:\Documents and Settings\All Users'
APPDATA='C:\Documents and Settings\David\Application Data'
BASH=/bin/sh
BASH_ARGC=()
BASH_ARGV=()
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]=3 [1]=1 [2]=17 [3]=6 [4]=release 
[5]=i686-pc-cygwin)
BASH_VERSION='3.1.17(6)-release'
CLASSPATH='C:\Program Files\QuickTime\QTSystem\QTJava.zip'
COMMONPROGRAMFILES='C:\Program Files\Common Files'
COMPUTERNAME=THEMORNINGLIGHT
COMSPEC='C:\WINDOWS\system32\cmd.exe'
DIRSTACK=()
EUID=400
FP_NO_HOST_CHECK=NO
GROUPS=()
HISTFILE='/cygdrive/c/Documents and Settings/David/.bash_history'
HISTFILESIZE=500
HISTSIZE=500
HOME='/cygdrive/c/Documents and Settings/David'
HOMEDRIVE=C:
HOMEPATH='\Documents and Settings\David'
HOSTNAME=TheMorningLight
HOSTTYPE=i686
IFS=$' \t\n'
LOGONSERVER='\\THEMORNINGLIGHT'
MACHTYPE=i686-pc-cygwin
MAILCHECK=60
NUMBER_OF_PROCESSORS=1
OPTERR=1
OPTIND=1
OS=Windows_NT
OSTYPE=cygwin
PATH='/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/Program
 Files/QuickTime/QTSystem/'
PATHEXT='.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
PIPESTATUS=([0]=0)
PPID=1
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER='x86 Family 15 Model 3 Stepping 4, GenuineIntel'
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0304
PROGRAMFILES='C:\Program Files'
PROMPT='$P$G'
PS1='\s-\v\$ '
PS2=' '
PS4='+ '
PWD=/usr/bin
QTJAVA='C:\Program Files\QuickTime\QTSystem\QTJava.zip'
SESSIONNAME=Console
SHELL=/bin/sh
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
SHLVL=1
SYSTEMDRIVE=C:
SYSTEMROOT='C:\WINDOWS'
TEMP=/cygdrive/c/DOCUME~1/David/LOCALS~1/Temp
TERM=cygwin
TMP=/cygdrive/c/DOCUME~1/David/LOCALS~1/Temp
UID=400
USERDOMAIN=THEMORNINGLIGHT
USERNAME=David
USERPROFILE='C:\Documents and Settings\David'
WINDIR='C:\WINDOWS'
_=set


cygcheck2.out
Description: Binary data
!::='::\'
!C:='C:\cygwin\bin'
ALLUSERSPROFILE='C:\Documents and Settings\All Users'
APPDATA='C:\Documents and Settings\Benji\Application Data'
BASH=/usr/bin/bash
BASH_ARGC=()
BASH_ARGV=()
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]=3 [1]=1 [2]=17 [3]=6 [4]=release 
[5]=i686-pc-cygwin)
BASH_VERSION='3.1.17(6)-release'
CLASSPATH='C:\Program Files\QuickTime\QTSystem\QTJava.zip'
COMMONPROGRAMFILES='C:\Program Files\Common Files'
COMPUTERNAME=THEMORNINGLIGHT
COMSPEC='C:\WINDOWS\system32\cmd.exe'
CVS_RSH=/bin/ssh
DIRSTACK=()
EUID=1012
FP_NO_HOST_CHECK=NO
GROUPS=()
HISTFILE=/home/Benji/.bash_history
HISTFILESIZE=500
HISTSIZE=500
HOME=/home/Benji
HOMEDRIVE=C:
HOMEPATH='\Documents and Settings\Benji'
HOSTNAME=TheMorningLight
HOSTTYPE=i686
IFS=$' \t\n'