"resolve(name, type[, class, flags, callback])\n resolve query, callback when it's finished\n"
"todname(name)\n convert name to wire format\n"
"tojson(val)\n convert value to JSON\n"
- "map(expr)\n run expression on all workers\n"
"net\n network configuration\n"
"cache\n network configuration\n"
"modules\n modules configuration\n"
static int l_map(lua_State *L)
{
+ /* We don't kr_log_deprecate() here for now. Plan: after --forks gets *removed*,
+ * kill internal uses of map() (e.g. from daf module) and add deprecation here.
+ * Alternatively we might (attempt to) implement map() in another way. */
if (lua_gettop(L) != 1 || !lua_isstring(L, 1))
lua_error_p(L, "map('string with a lua expression')");
" -t, --tls=[addr] Server address for TLS (default: off).\n"
" -S, --fd=[fd:kind] Listen on given fd (handed out by supervisor, :kind is optional).\n"
" -c, --config=[path] Config file path (relative to [rundir]) (default: config).\n"
- " -f, --forks=N Start N forks sharing the configuration (implies -n).\n"
" -n, --noninteractive Don't start the read-eval-print loop for stdin+stdout.\n"
" -q, --quiet No command prompt in interactive mode.\n"
" -v, --verbose Run in verbose mode."
break;
case 'f':
args->forks = strtol_10(optarg);
+ if (args->forks == 1) {
+ kr_log_deprecate("use --noninteractive instead of --forks=1\n");
+ } else {
+ kr_log_deprecate("support for running multiple --forks will be removed\n");
+ }
if (args->forks <= 0) {
kr_log_error("[system] error '-f' requires a positive"
" number, not '%s'\n", optarg);
.IR fd ]
.RB [ \-c | \-\-config
.IR config ]
-.RB [ \-f | \-\-forks
-.IR N ]
.RB [ \-n | \-\-noninteractive ]
.RB [ \-q | \-\-quiet ]
.RB [ \-v | \-\-verbose ]
described in \fIdaemon/README.md\fR.
.TP
.B \-f\fI N\fR, \fB\-\-forks=\fI<N>
+This option is deprecated since 5.0.0!
+
With this option, the daemon is started in non-interactive mode and instead creates a
UNIX socket in \fIrundir\fR that the operator can connect to for interactive session.
A number greater than 1 forks the daemon N times, all forks will bind to same addresses
#define kr_log_info printf
#define kr_log_error(...) fprintf(stderr, ## __VA_ARGS__)
+#define kr_log_deprecate(...) fprintf(stderr, "deprecation WARNING: " __VA_ARGS__)
/* Always export these, but override direct calls by macros conditionally. */
/** Whether in --verbose mode. Only use this for reading. */