+
    jHàj8  ã                  óô   € R t ^ RIHt ^ RIt^ RIHt ^ RIHt ^ RIH	t	  ^ RI
t]P                  ! ]4      t]! ]	R,          R,          4      t]! 4       tRR R	 lltRR
 R llt. ROtR#   ]]3 d    Rt LRi ; i)zIBest-effort process resource-limit adjustments for long-running services.)ÚannotationsN)ÚMapping)ÚAny)ÚDEFAULT_CONFIGÚruntimeÚnofile_soft_limitc               ó    € V ^8„  d   QhRRRR/# )é   ÚconfigúMapping[str, Any] | NoneÚreturnz
int | None© )Úformats   "Ú?/home/ubuntu/.hermes/hermes-agent/hermes_cli/resource_limits.pyÚ__annotate__r      s   € ÷ ñ Ð)Að ÈZñ ó    c                óÞ  € V f    ^ RI Hp V! 4       p \        V \        4      '       g   R# V P                  R\        4      pV\        J d   \        # \        V\        4      '       g   R# VP                  R\        4      pV\        J d   \        # \        V\        4      '       g   \        V\        4      '       d   V^ 8:  d   R# V#   \         d    \        P	                  RRR7        R# i ; i)uJ  ``runtime.nofile_soft_limit`` from a loaded config, or ``None`` when disabled/unresolvable.

Missing key â†’ default. Explicit ``0``/``false``/``null`` disable; other non-int or negative
values are ignored (caller fails open). Shared by the in-process floor and service-definition
generators (launchd plist) so both use one knob.
N)Úload_config_readonlyz'Could not load config for RLIMIT_NOFILET©Úexc_infor   r   )Úhermes_cli.configr   Ú	ExceptionÚloggerÚdebugÚ
isinstancer   ÚgetÚ_MISSINGÚDEFAULT_NOFILE_SOFT_LIMITÚboolÚint)r
   r   r   Ú	raw_values   &   r   Úconfigured_nofile_soft_limitr!      sÆ   € ð ‚~ð	å>Ù)Ó+ˆFô �fœg×&Ò&ÙØ�j‰j˜¤HÓ-€GØ”(ÓÜ(Ð(Ü�gœw×'Ò'ÙØ—‘Ð/´Ó:€IØ”HÓÜ(Ð(Ü�)œT×"Ò"¬*°YÄ×*DÒ*DÈ	ÐUVÌÙØÐøô ô 	Ü�L‰LÐBÈTˆLÔRÚð	ús   †C Ã"C,Ã+C,c               ó    € V ^8„  d   QhRRRR/# )r	   r
   r   r   r   r   )r   s   "r   r   r   4   s   € ÷ ñ Ð$<ð Èñ r   c                ó”  € \         f   R# \        V 4      pVf   R#  \         P                  p\         P                  ! V4      w  r4\	        \         R\        4       4      pW58X  g   W18¼  d   R# WE8X  d   TM
\        W4      pWc8:  d   R# \         P                  ! W&V34       R#   \         d    \        P                  RRR7        R# i ; i)a^  Best-effort raise of this process's ``RLIMIT_NOFILE`` soft limit; ``True`` iff changed.

Target = ``runtime.nofile_soft_limit`` (default :data:`DEFAULT_NOFILE_SOFT_LIMIT`), clamped
to a finite hard limit; never lowers a higher soft limit. Unsupported platforms, malformed
settings, and denied ``setrlimit`` must never prevent a server from starting.
FÚRLIM_INFINITYTz(Could not raise RLIMIT_NOFILE soft limitr   )Ú	_resourcer!   ÚRLIMIT_NOFILEÚ	getrlimitÚgetattrÚobjectÚminÚ	setrlimitr   r   r   )r
   ÚtargetÚnofileÚcurrent_softÚcurrent_hardÚinfinityÚnew_softs   &      r   Úapply_nofile_soft_limitr2   4   sµ   € ô ÒÙÜ)¨&Ó1€FØ‚~ÙðÜ×(Ñ(ˆÜ%.×%8Ò%8¸Ó%@Ñ"ˆô œ9 o´v³xÓ@ˆØÔ# |Ô'=ÙØ)Ô5‘6¼3¸vÓ;TˆØÔ#ÙÜ×Ò˜F¨|Ð$<Ô=ÙøÜô Ü�‰Ð?È$ˆÔOÚðús   �AB! Á,B! ÂB! Â!"CÃC)N)r   r2   r!   )Ú__doc__Ú
__future__r   ÚloggingÚcollections.abcr   Útypingr   Úhermes_cli.config_defaultsr   Úresourcer%   ÚImportErrorÚModuleNotFoundErrorÚ	getLoggerÚ__name__r   r   r   r)   r   r!   r2   Ú__all__r   r   r   Ú<module>r?      s}   ðÙ Oå "ã Ý #Ý å 5ðÛ ð 
×	Ò	˜8Ó	$€á ¨yÕ 9Ð:MÕ NÓOÐ Ù‹8€÷÷<ò< c‚øðK 	Ð(Ð)ô Ø‚Iðús    A) Á)A7Á6A7