30 Commits

Author SHA1 Message Date
Kadir Can Ozden
6ada1ce03a fix: ensure pidfile fd is closed on rename failure 2026-02-20 06:17:29 +03:00
Paul J. Dorn
4f7766585d Python 3.3+: replace deprecated aliases
since 3.3: EnvironmentError, IOError, socket.error and select.error are merged into IOError.
They may now return a more specific subclass - which this commit does not utilize yet.
2024-04-22 03:33:31 +02:00
Paul J. Dorn
ec85b32d3b Pythn 2.7+: open arg defaults to r 2024-04-22 03:33:31 +02:00
Paul J. Dorn
422b18acea class Name(object): -> class Name: 2024-04-22 03:33:30 +02:00
Paul J. Dorn
4323027b1e drop long-default - coding: utf-8 2024-04-22 03:33:14 +02:00
Takuya Noguchi
ed901637ff Enable pycodestyle 2019-11-28 19:30:38 +09:00
Randall Leeds
d18a9cd12f catch access denied to pid file
fix #1091
2017-01-11 19:52:16 -08:00
Brijesh Bittu
db786ce90e Removed or 0
Removed `or 0` to raise `ValueError` for empty pidfile or pidfile with invalid contents.
2015-07-09 11:44:14 +05:30
Brijesh Bittu
68a944088e Update pidfile.py
Return directly in the `except` instead of checking again for zero (as suggested by @benoitc and @tilgovi)
2015-07-09 10:38:14 +05:30
Brijesh Bittu
80e93b9c55 Updated gunicorn/pidfile.py
Added a try block to convert the contents of the `pidfile.py` if it can be converted to integer or not. If not, then `wpid` is assigned 0 and the `validate` function returns as usual. If the pidfile has a valid int, the function continues to kill the process as before.
2015-06-04 12:48:03 +05:30
Collin Anderson
0d3045bb41 cleaned some code 2014-09-10 20:34:22 -04:00
Jakub Paweł Głazik
ed94dd0267 Display correct pid of already running instance 2014-07-31 01:31:46 +02:00
Berker Peksag
829e8d32d4 Remove __future__.with_statement imports.
Gunicorn requires Python 2.6 or newer now:

http://docs.gunicorn.org/en/latest/install.html#requirements
2014-05-15 00:34:02 +03:00
Kevin Luikens
770005f73d use byte string when writing to pid file - fix #504 2013-03-19 13:44:21 -07:00
Adnane Belmadiaf
20cd49595a PEP8 fixes 2012-12-24 09:53:03 +01:00
benoitc
d218ba54c6 use args as well. 2012-10-25 10:14:05 +02:00
benoitc
53ce50bc7b obvious syntax fixes preparing python3 support 2012-10-24 12:11:15 +02:00
benoitc
f168a21dae fix whitespaces 2012-02-19 11:27:46 +01:00
benoitc
95520d4728 set permissions of the pidfile so other user can read it and use it. 2010-11-24 16:35:33 +01:00
Paul J. Davis
3a0150442b Allow for pidfiles in $CWD 2010-05-25 13:03:35 -04:00
Paul J. Davis
63e39e1232 Slight grammar tweak. 2010-05-19 13:34:42 -04:00
Benoit Chesneau
fdf8169a2c fix issue #57 and make sure target dir of pidfile exists. 2010-05-19 19:29:51 +02:00
Benoit Chesneau
ed17054137 fix issue #55. Thanks! 2010-05-17 16:31:25 +02:00
Paul J. Davis
1a03c3f36e Bug preventing HUP completion.
Just a bit of cruft from the pidfile updates.
2010-05-16 14:02:55 -04:00
Paul J. Davis
db5bd53c4e If no pidfile is specified, use a random tmp file. 2010-05-11 23:10:52 -04:00
benoitc
87760fe750 put pidfile funcs in object on suggestion from davisp "but that's a
simple change"
2010-05-09 01:49:24 +02:00
benoitc
cbd91309fe don't use a property, instead use simple function. spotted by davisp:
"It seems too magical to me"
2010-05-09 01:13:32 +02:00
benoitc
33cf5dab01 with statement for py25 + bump release number 2010-03-13 22:16:58 +01:00
benoitc
f75a413773 some fixes to config and pidfile 2010-03-11 13:53:10 +01:00
benoitc
f2adef3d35 refactor pidfile 2010-03-11 13:19:19 +01:00