소스 검색

Don't bail out if we want a ulimit above our hard limit.

Most people run supervisord as root.  When root, supervisord can
legitimately increase its ulimit above the hard limit.  When not
root, setrlimit will throw an error, which is already handled
appropriately.

Without this, one needs to further edit startup scripts to raise
the limits before supervisord starts, which increases deployment
complexity.  People are also often confused with PAM's limits.conf
and will edit that instead, to find out that their change works
until the machine reboots and supervisord is started with lowered
ulimit during the boot process (where PAM doesn't intervene).
Benoit Sigoure 14 년 전
부모
커밋
2c7cf73c4f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      supervisor/options.py

+ 1 - 1
supervisor/options.py

@@ -1212,7 +1212,7 @@ class ServerOptions(Options):
             
             if (soft < min) and (soft != -1): # -1 means unlimited 
                 if (hard < min) and (hard != -1):
-                    self.usage(msg % locals())
+                    hard = min
 
                 try:
                     resource.setrlimit(res, (min, hard))