summary refs log tree commit diff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* * hasshsgr.h?, warn-shsgr: remove; obsolete.Gerrit Pape2024-10-103-10/+0
|
* runit(8): don't leak SIGCONT SIG_IGN into all child processesLeah Neukirchen2024-10-061-1/+1
| | | | | https://inbox.vuxu.org/supervision/87tug3vzex.fsf@vuxu.org/ https://github.com/ksh93/ksh/issues/301
* chpst.dist, sv.dist, svlogd.dist, utmpset.dist: adaptGerrit Pape2024-09-274-6/+6
|
* chpst: add -C to change working directoryAndrew J. Hesford2024-09-271-2/+7
|
* fix compilation warning(s): -WunsequencedZ. Liu2024-09-261-1/+2
| | | | | | | | | | | | | | found by using clang 18 with CFLAGS: -Wall link of debian's patches is: https://salsa.debian.org/debian/runit/-/tree/master/debian/patches 0016-fix-warning-for-undefined-operation-on-sequence-poin.patch chpst.c:312:33: warning: unsequenced modification and access to 'subgetoptarg' [-Wunsequenced] 312 | if (optarg[scan_ulong(++optarg, &ul)]) usage(); nicelvl =ul; | ~~~~~~ ^ gcc report: chpst.c:312:33: warning: operation on 'subgetoptarg' may be undefined [-Wsequence-point]
* svlogd.c: Initialize all fields of sockaddr_in.Érico Rolim2024-09-251-0/+1
| | | | http://skarnet.org/cgi-bin/archive.cgi?2:mss:1163:201602:gpiglpbjdemlioaeabbn
* add sleep_microseconds to encapsulate (u|nano)sleepZ. Liu2024-09-251-1/+13
| | | | | | | | | | | man 3 usleep: POSIX.1-2001 declares it obsolete, suggesting nanosleep(2) instead. Removed in POSIX.1-2008. we use a feature test macro to select usleep or naosleep, while debian's patch replace usleep with nanosleep. links of debian's patches is: https://salsa.debian.org/debian/runit/-/tree/master/debian/patches 0017-fix-replace-obsolete-usleep-with-nanosleep.patch
* add/update doc & man page of chpst and runsvZ. Liu2024-09-252-3/+3
| | | | | | | | | | | | | | | 1. fix error in runsv for log/finish: Log ./finish script is not actually invoked. It is not clear, whether this limitation is worth lifting. 2. add options -t and -V to chpst man page; ignore -r since it's obsolete. 3. clarify in runsv.8 manpage how signal override works with control/dx copied from debian's patch: 0009-fix-error-in-manpage.patch 0027-Clarify-runsv-8-control-dx.patch 0027-Add-missing-options-to-chpst-manpage.patch links of debian's patches is: https://salsa.debian.org/debian/runit/-/tree/master/debian/patches
* support /etc/runit/nosync file to make sync on shutdown/reboot optionalAndras Korn2024-09-252-5/+11
| | | | https://bugs.debian.org/695281
* no longer check for shortsetgroups, setgroups is used directlyGerrit Pape2024-09-257-86/+4
| | | | Thx Leah Neukirchen.
* utmpset.c: mixes "int32_t *" and "time_t *"Gerrit Pape2024-09-251-2/+6
| | | | | Don't pass int32_t to time(), thx Lorenzo Beretta, https://bugs.debian.org/754849
* fix compilation warning(s): -Wincompatible-pointer-types-discards-qualifiersZ. Liu2024-09-2512-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | found by using clang 18 with CFLAGS: -Wall since gcc 14, certain warnings (including this one, gcc report as -Wincompatible-pointer-types) are now errors, see https://gcc.gnu.org/gcc-14/porting_to.html link of debian's patches is: https://salsa.debian.org/debian/runit/-/tree/master/debian/patches 0014-fix-implicit-declarations-incompatible-types-argv-ty.patch pathexec_run.c: warning: passing 'const char *const *' to parameter of type 'char *const *' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers] 19 | execve(file,argv,envp); | ^~~~ ^~~~ 36 | execve(tmp.s,argv,envp); | ^~~~ ^~~~ pathexec_env.c:67:21: warning: passing 'const char *const *' to parameter of type 'char *const *' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers] 67 | pathexec_run(file,argv,e); | ^~~~ pathexec_env.c:67:26: warning: passing 'const char **' to parameter of type 'char *const *' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers] 67 | pathexec_run(file,argv,e); | ^ runsvdir.c:74:25: warning: passing 'const char *[3]' to parameter of type 'char *const *' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers] 74 | pathexec_run(*prog, prog, (const char* const*)environ); | ^~~~ runsvdir.c:74:31: warning: passing 'const char *const *' to parameter of type 'char *const *' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers] 74 | pathexec_run(*prog, prog, (const char* const*)environ); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
* fix compilation errors(s)/warning(s) of x86_cpuid.cZ. Liu2024-09-251-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | found by using clang 18 with CFLAGS: -Wall link of debian's patches is: https://salsa.debian.org/debian/runit/-/tree/master/debian/patches 0029-fix-ftbfs-with-gcc14.patch x86cpuid.c:7:3: error: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 7 | exit(1); | ^ x86cpuid.c:34:7: error: call to undeclared function 'putchar'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 34 | putchar(c); | ^ x86cpuid.c:37:3: error: call to undeclared library function 'printf' with type 'int (const char *, ...)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 37 | printf("-%08x-%08x\n",y[0],y[3]); | ^ x86cpuid.c:37:25: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] 37 | printf("-%08x-%08x\n",y[0],y[3]); | ~~~~ ^~~~ | %08lx x86cpuid.c:37:30: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] 37 | printf("-%08x-%08x\n",y[0],y[3]); | ~~~~ ^~~~ | %08lx gcc report: x86cpuid.c:7:3: warning: implicit declaration of function 'exit' [-Wimplicit-function-declaration] x86cpuid.c:7:3: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch] x86cpuid.c:34:7: warning: implicit declaration of function 'putchar' [-Wimplicit-function-declaration] x86cpuid.c:37:3: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration] x86cpuid.c:37:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] x86cpuid.c:37:15: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'long unsigned int' [-Wformat=] x86cpuid.c:37:20: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Wformat=]
* fix compilation error(s): call to undeclared function for C99 and laterZ. Liu2024-09-254-0/+5
| | | | | | | | | | found by using clang 18 with CFLAGS: -Wall error: call to undeclared function '...'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] chpst.c: setgroups pathexec_run.c: execve prot.c: setgroups, setgid, setuid seek_set.c: lseek
* fix undesired compilation error(s) of feature testZ. Liu2024-09-259-4/+14
| | | | | | | | | | | | | | | | | | | | If don't fix, the feature test will generate undesired .h which will be used in later compilation, some will cause build failed. see *.h{1,2} for details, run following cmd to see difference: diff -uprN <(more *.h1|sed 's:\.h1$:.h:g') <(more *.h2|sed 's:\.h2$:.h:g') found by using clang 18 with CFLAGS: -Wall link of debian's patches is: https://salsa.debian.org/debian/runit/-/tree/master/debian/patches 0029-fix-ftbfs-with-gcc14.patch chkshsgr.c trycpp.c trypoll.c tryshsgr.c tryulong64.c: error: call to undeclared function '...'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] functions are: _exit, exit, getgroups, printf, setgroups tryflock.c trysgact.c trysgprm.c trywaitp.c: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
* * sv.c: properly format status command's output on failure cases.Gerrit Pape2014-08-102-9/+13
|
* src/sv.dist: adapt.Gerrit Pape2014-08-041-1/+1
|
* * sv.c: support optional LSB init script actions reload andGerrit Pape2014-08-011-1/+4
| | | | | | try-restart. http://bugs.debian.org/545227
* * fmt_ptime.c: 64 bits time_t fix for svlogd (tnx JérémieGerrit Pape2014-07-301-1/+1
| | | | | | | Courrèges-Anglas). Patch fetched from the OpenBSD ports tree http://openbsd.cs.toronto.edu/cgi-bin/cvsweb/ports/sysutils/runit/patches/patch-src_fmt_ptime_c?rev=1.1&content-type=text/x-cvsweb-markup
* * sv.c: fix typo that may lead to wrong output from sv when reportingGerrit Pape2014-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | status of multiple service directories. Thx Jamie Heilman, https://bugs.debian.org/715512: > Given two service directories: > > # ls testapp1 > run supervise > # ls testapp2 > log run supervise > > where testapp1 is running, and testapp2 isn't: > > # sv status ./testapp1 > run: ./testapp1: (pid 3682) 408178s > # sv status ./testapp2 > fail: ./testapp2: runsv not running > # sv status ./testapp1 ./testapp2 > run: ./testapp1: (pid 3682) 408184s > fail: ./testapp2: runsv not running > run: ./testapp2: (pid 3682) 408184sfail: ./testapp2: runsv not running
* update chpst.dist, sv.distGerrit Pape2009-10-042-4/+4
|
* * sv.c: on 'down', send runsv the 'down' command properly if not yetGerrit Pape2009-10-041-1/+2
| | | | done (e.g. when taken up with 'once').
* * runsv.c: exit with error if [log/]supervise/control exists, but isGerrit Pape2009-09-241-0/+8
| | | | not a fifo (thx Charlie Brady).
* * chpst.c, svwaitdown.c, svwaitup.c: fix checks for return value ofGerrit Pape2009-09-243-3/+3
| | | | open_* functions (thx David Reiss).
* * sv.c: fix exit code of status command in lsb mode (thx MathieuGerrit Pape2009-09-241-4/+6
| | | | Poumeyrol)
* * pathexec_env.c, pathexec.h: add function pathexec_env_run().Gerrit Pape2009-09-243-7/+18
| | | | | * chpst.c, man/chpst.8: new option -b argv0: run prog with different 0th argument.
* sv.dist: adapt.Gerrit Pape2008-05-071-1/+1
|
* runsvchdir.c: typo.Gerrit Pape2008-05-071-1/+1
|
* * runsv.c: create temporary new status files for log/supervise/ actuallyGerrit Pape2008-05-051-42/+42
| | | | in log/supervise/.
* * change default directory for services from /var/service/ to /service/.Gerrit Pape2008-04-201-1/+1
|
* sv.c: service name is also relative to the current directory if it ends with ↵Gerrit Pape2008-04-201-1/+2
| | | | a slash.
* tests dist.Gerrit Pape2007-09-194-4/+4
|
* * runit.c: force check for zombies after a 14 second timeout withoutGerrit Pape2007-09-191-6/+6
| | | | signals (CHLD, CONT, INT).
* sv.c: typo.Gerrit Pape2007-09-131-1/+1
|
* sv.c: whitespace fixups.Gerrit Pape2007-09-131-35/+35
|
* runit.c: speed up collecting zombies.Gerrit Pape2007-09-131-3/+8
|
* s/\t/ /gGerrit Pape2007-09-138-110/+110
|
* sv.c: fix race on check for down if pid is 0 and state is run or finish.Gerrit Pape2007-09-131-8/+7
|
* uw_tmp.h1: fallback to UTMP_FILE if _PATH_UTMP is not defined as seenGerrit Pape2007-08-271-0/+10
| | | | on AIX 5.2 ML1, AIX 5.3 ML5 (thx Daniel Clark).
* chpst.c: add explicit braces to avoid ambiguous 'else'.Gerrit Pape2007-06-261-2/+4
|
* runit.c: fix typo in error messages (thx Matthew R. Dempsky); minor rewordingGerrit Pape2007-06-141-2/+2
|
* svlogd.c: don't statically bind local udp socketGerrit Pape2007-04-171-9/+8
| | | | ..., but request new source port for each log message sent through udp.
* chpst.c, uidgid.c: improve error reporting if getpwnam() or getgrnam() failsGerrit Pape2007-04-172-35/+35
| | | | ...cleanup.
* * doc/index.html: some reordering.Gerrit Pape2006-11-212-113/+113
| | | | | | * runit.c: fix arguments to wait_pid() after fork for reboot_system() (thx Jan Kampe). * man/runsv.8: suggest printf t instead of echo -n t.
* * chpst.c, uidgid.c, uidgid.h: support numerical uid gid throughGerrit Pape2006-11-024-17/+71
| | | | | | | | chpst -[u|U] :uid:gid... * man/chpst.8: adapt; clarify that users and groups are looked up in /etc/passwd and /etc/group only. * sv.c: properly wait for a service to be restarted on 'restart'; support checks through -v for pause, cont, kill.
* * runit.c: don't make console the controlling terminal for process 1,Gerrit Pape2006-10-071-3/+13
| | | | | but for stage 1 only; fork before initiating system halt or reboot, the linux kernel calls do_exit(0) in kernel/sys.c (thx Jan Kampe).
* * svlogd.c, fmt_ptime.*, man/svlogd.8: new option -ttt: prefix logGerrit Pape2006-07-244-14/+29
| | | | | | | messages with sortable UTC timestamp YYYY-MM-DDTHH:MM:SS.xxxxx. * runsv.c, runsv.8: give to arguments to ./finish: exit code and exit status of ./run (mostly copied from pipe-tools' npt-supervise, thx Laurent Bercot).
* * uidgid.c: properly fixup user/group argument on getpwnam() error.Gerrit Pape2006-06-201-1/+1
|
* * src/svlogd.c: cleanup *.t files possibly leftover by processor whenGerrit Pape2006-06-191-22/+38
| | | | | | | | interrupted by signal, also on startup (thx Andras Korn); 1st rename .t to .s, then remove .u. * man/svlogd.8: adapt. * svlogd.c: prepend optional timestamp to log messages sent through UDP, as done for messages written to dir and to stderr.
* * runsv.c: delay restart of log service at least 1 sec, just as the mainGerrit Pape2006-05-102-3/+3
| | | | | service. * runsvdir.c: don't double-copy filedescriptor.