Skip to content

Commit

Permalink
svscan: make max number of services configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
mbhangui committed Oct 26, 2024
1 parent cfe8452 commit b305fec
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 71 deletions.
2 changes: 2 additions & 0 deletions daemontools-x/doc/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
11. svscan.c, supervise.c: renamed SERVICEDIR to SCANDIR
12. svscan.c: set PPID in main() to eliminate memory allocation failure in
child
- 26/10/2024
13. svscan.c: make max number of services configurable

* Tue Aug 06 2024 12:48:42 +0000 Manvendra Bhangui <daemontools@indimail.org> 1.1.5-1.1%{?dist}
Release 1.1.5-1.1 Start 05/02/2024 End 06/08/2024
Expand Down
17 changes: 12 additions & 5 deletions daemontools-x/svscan.9
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
svscan \- starts and monitors a collection of services

.SH SYNOPSIS
.B svscan [ -vs ] [ \fIscandir\fR ]
.B svscan [ -vs ] [-n count] [ \fIscandir\fR ]

.SH DESCRIPTION
\fBsvscan\fR(8) starts one \fBsupervise\fR(8) process for each subdirectory
of the current directory, up to a limit of 1000 subdirectories. You can
override using current directory by passing \fIscandir\fR as an argument.
If \fBsvscan\fR is given a command-line argument \fIdir\fR, it switches to
that directory when it starts.
of the current directory, up to a limit of subdirectories as default. You
can change the default by passing -n option, in which case \fBsvscan\fR
will allocate memory for \fIcount\fR service slots. You can override using
current directory by passing \fIscandir\fR as an argument. If \fBsvscan\fR
is given a command-line argument \fIdir\fR, it switches to that directory
when it starts.

\fBsvscan\fR skips subdirectory names starting with dots. \fBsupervise\fR
must be in \fBsvscan\fR's path. If the environment variable \fBSETSID\fR is
Expand Down Expand Up @@ -215,6 +217,11 @@ entrypoint for docker/podman and starts as PID 1. This entrypoint is
implemented using the \fBdocker-entrypoint\fR(8) script.

.SH OPTIONS
.TP 3
.B \-n \fIcount\fR
Allocate memory for \fIcount\fR service slots. Without this option
\fBsvscan\fR will scan upto 1000 subdirectories in \fIscandir\fR.

.TP
.B \-v
Display informational messages. Normally this is suppressed. You can toggle
Expand Down
Loading

0 comments on commit b305fec

Please sign in to comment.