#include <errno.h>#include <poll.h>#include <signal.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/param.h>#include <sys/resource.h>#include <sys/socket.h>#include <sys/time.h>#include <sys/uio.h>#include <sys/wait.h>#include <atalk/adouble.h>#include <atalk/afp.h>#include <atalk/atp.h>#include <atalk/asp.h>#include <atalk/compat.h>#include <atalk/dsi.h>#include <atalk/errchk.h>#include <atalk/globals.h>#include <atalk/logger.h>#include <atalk/nbp.h>#include <atalk/netatalk_conf.h>#include <atalk/server_child.h>#include <atalk/server_ipc.h>#include <atalk/util.h>#include "afp_config.h"#include "afpstats.h"#include "fork.h"#include "status.h"#include "uam_auth.h"Macros | |
| #define | ASEV_THRESHHOLD 10 |
| #define | WAIT_ANY (-1) |
Functions | |
| static afp_child_t * | dsi_start (AFPObj *obj, DSI *dsi, server_child_t *server_children) |
| static afp_child_t * | asp_start (AFPObj *obj, server_child_t *server_children) |
| static void | asp_cleanup (const AFPObj *obj) |
| static void | afp_exit (int ret) |
| static bool | init_listening_sockets (const AFPObj *dsiconfig, const AFPObj *aspconfig) |
| static bool | reset_listening_sockets (const AFPObj *dsiconfig, const AFPObj *aspconfig) |
| static void | afp_goaway (int sig) |
| static void | child_handler (void) |
| static int | raise_nofile_to (const char *who, rlim_t target, rlim_t *out) |
| Raise RLIMIT_NOFILE toward a target, probing down on rejection. | |
| static int | setlimits (void) |
| int | main (int ac, char **av) |
Variables | |
| unsigned char | nologin = 0 |
| static AFPObj | dsi_obj |
| static AFPObj | asp_obj |
| static server_child_t * | server_children |
| static sig_atomic_t | reloadconfig = 0 |
| static sig_atomic_t | gotsigchld = 0 |
| static struct asev * | asev |
| static int | afpstats_listen_fd = -1 |
| #define ASEV_THRESHHOLD 10 |
| #define WAIT_ANY (-1) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| int main | ( | int | ac, |
| char ** | av ) |
|
static |
Raise RLIMIT_NOFILE toward a target, probing down on rejection.
Requests target and, if the kernel refuses it with EINVAL/EPERM, binary-searches for the largest acceptable value. The realised soft limit is delivered via out (not the return value) so RLIM_INFINITY is never confused with the -1 error sentinel. The caller guarantees the current soft limit is finite and below target.
| [in] | who | caller label for log messages |
| [in] | target | desired soft (and, if lower, hard) limit |
| [out] | out | realised soft limit after the attempt |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| unsigned char nologin = 0 |
|
static |
|
static |