Re: translating "create Semaphore" to Linux

2008-08-29 Thread Tim Golden
GHUM wrote: Tim, ... why use a Semaphore rather than a Mutex? as much as I understood the documentation at MSDN http://msdn.microsoft.com/en-us/library/ms686927(VS.85).aspx http://msdn.microsoft.com/en-us/library/ms686946(VS.85).aspx a mutex seems to be nothing else than a special case of a

Re: translating "create Semaphore" to Linux

2008-08-29 Thread GHUM
Tim, > ... why use a Semaphore rather than a Mutex? as much as I understood the documentation at MSDN http://msdn.microsoft.com/en-us/library/ms686927(VS.85).aspx http://msdn.microsoft.com/en-us/library/ms686946(VS.85).aspx a mutex seems to be nothing else than a special case of a semaphore? Th

Re: translating "create Semaphore" to Linux

2008-08-29 Thread Tim Golden
GHUM wrote: hSem = win32event.CreateSemaphore (None, 1, 1,"stringincludinginterfaceandport") rt=win32event.WaitForSingleObject (hSem, 0) if rt != win32event.WAIT_TIMEOUT: really_do_start_my_app() else: print "application allready running" to make sure that only ONE instance of the applicat

Re: translating "create Semaphore" to Linux

2008-08-29 Thread Francesco Bochicchio
On 29 Ago, 13:28, GHUM <[EMAIL PROTECTED]> wrote: > hello, > > in my application I am using > > hSem = win32event.CreateSemaphore (None, 1, > 1,"stringincludinginterfaceandport") > rt=win32event.WaitForSingleObject (hSem, 0) > if rt != win32event.WAIT_TIMEOUT: >    really_do_start_my_app() > else:

Re: translating "create Semaphore" to Linux

2008-08-29 Thread Diez B. Roggisch
GHUM wrote: > hello, > > in my application I am using > > hSem = win32event.CreateSemaphore (None, 1, > 1,"stringincludinginterfaceandport") > rt=win32event.WaitForSingleObject (hSem, 0) > if rt != win32event.WAIT_TIMEOUT: >really_do_start_my_app() > else: >print "application allready ru