> Hey -
>
> I'm having some trouble with the pidfile = lockfile method discussed
> earlier on the #uwsgi IRC channel.
>
> Using custom-compiled (core buildconf) uWSGI 1.4.4 on Debian 6. My
> configuration is as follows (reduced to a minimal skeleton):
>
> [uwsgi]
> pidfile = /tmp/foo.pid
> flock = %(pidfile)
>
> and uWSGI dies with
>
>     open("%(pidfile)"): No such file or directory [core/uwsgi.c line 3847]
>
> So firstly why isn't %(pidfile) being substituted with the actual pidfile
> value? (UWSGI_OPT_IMMEDIATE is to blame, I guess?)
> Substituting it manually in the INI then ends up with
>
>     open("/tmp/foo.pid"): No such file or directory [core/uwsgi.c line
> 3847]
>
> most likely because /tmp/foo.pid doesn't exist yet. So I'm wondering
> whether something other than just O_RDWR should be passed to
> open() in uwsgi_opt_flock(), such as O_RDWR | O_CREAT...
> I'll be the first to admit that I'm not the best versed in POSIX
> semantics, so I don't know what untoward side effects that might have.
>
> Best,
>
> Aarni
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>

Ok, i think using the pidfile as the lockfile is an unsolvable problem
(too much things will break) .

Maybe the best bet is using the config file (it exists for sure ;) as the
argument to flock.


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

Reply via email to