> Hi
>
> I have enabled POSIX semaphores on my uwsgi-1.2.3 installation on my
> NetBSD-5.1 server.
> According to the man page, setting pshared to 1 should cause an error
> but it does not.
>
> Looking through the sem_init code, the pshared value is just discarded
> and never used.
> So my question is this - how can I test to see if the locking in uwsgi
> actually works
> on NetBSD like so as it seems to work fine for me. But my website is
> quite lightweight.
>
> http://roy.marples.name
>
> Thanks
>

Looks like pshared in NetBSD is not supported but if you want to check it
you can use that (start uWSGI with two processes)

def application(e, s):
    uwsgi.lock()
    print "i am worker %d" % uwsgi.worker_id()
    time.sleep(100)
    uwsgi.unlock()

send two requests to the app and check logs. If it works you only need to
see on "i am worker..." line, otherwise you will get two.


-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to