Commit Graph

5 Commits (master)

Author SHA1 Message Date
Michael Santos 2181666812 conn, event: remove variable reinitializations 8 months ago
Michael Santos e00a7fddd2 Consistently format using clang-format 5 years ago
Michael Santos 8e2fd1c363 xmppipe_conn_fd: check fd is a socket 5 years ago
Michael Santos 4a8d1f910f xmppipe_conn_fd: get highest open fd 6 years ago
Michael Santos c346c863e4 sandbox: set number of allowed fd's
The number of file descriptors enforced by setrlimit() can now be set at
compile time using a flag. The flag defaults to 0 on Linux and -1
everywhere else:

    XMPPIPE_SANDBOX=XMPPIPE_SANDBOX_RLIMIT \
    XMPPIPE_SANDBOX_RLIMIT_NOFILE=-1 \
    make

The meaning of the XMPPIPE_SANDBOX_RLIMIT_NOFILE is:

* -1 : set rlim_cur/rlim_max to the lowest allocated file desciptor

* >=0: set rlim_cur/rlim_max to this number

On some platforms, setting rlim_cur below the value of the highest
allocated fd may interfere with polling. See commit a34d5766c5 for
details.
7 years ago