aboutsummaryrefslogtreecommitdiff
path: root/runit
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-11-17 18:58:16 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-11-17 18:58:16 +0000
commite89087e8ac2bbd0d510f9291f8bd704059f4e48b (patch)
treebd51123a09a6e587b98dfa156ca7bf0ba55b2325 /runit
parent85f0978efd4641525ebcc47aa7c25aa8898241d7 (diff)
downloadbusybox-w32-e89087e8ac2bbd0d510f9291f8bd704059f4e48b.tar.gz
busybox-w32-e89087e8ac2bbd0d510f9291f8bd704059f4e48b.tar.bz2
busybox-w32-e89087e8ac2bbd0d510f9291f8bd704059f4e48b.zip
runit: add runsv, runsvdir and sv. Oh yes.
It even seems to work. +11K. :( git-svn-id: svn://busybox.net/trunk/busybox@16569 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'runit')
-rw-r--r--runit/Config.in22
-rw-r--r--runit/Kbuild5
-rw-r--r--runit/runit_lib.c23
-rw-r--r--runit/runit_lib.h12
4 files changed, 45 insertions, 17 deletions
diff --git a/runit/Config.in b/runit/Config.in
index c849c074c..8a7deea72 100644
--- a/runit/Config.in
+++ b/runit/Config.in
@@ -5,6 +5,28 @@
5 5
6menu "Runit Utilities" 6menu "Runit Utilities"
7 7
8config RUNSV
9 bool "runsv"
10 default n
11 help
12 runsv starts and monitors a service and optionally an appendant log
13 service.
14
15config RUNSVDIR
16 bool "runsvdir"
17 default n
18 help
19 runsvdir starts a runsv process for each subdirectory, or symlink to
20 a directory, in the services directory dir, up to a limit of 1000
21 subdirectories, and restarts a runsv process if it terminates.
22
23config SV
24 bool "sv"
25 default n
26 help
27 sv reports the current status and controls the state of services
28 monitored by the runsv supervisor.
29
8config SVLOGD 30config SVLOGD
9 bool "svlogd" 31 bool "svlogd"
10 default n 32 default n
diff --git a/runit/Kbuild b/runit/Kbuild
index 730035632..ad1706cb6 100644
--- a/runit/Kbuild
+++ b/runit/Kbuild
@@ -5,5 +5,8 @@
5# Licensed under the GPL v2, see the file LICENSE in this tarball. 5# Licensed under the GPL v2, see the file LICENSE in this tarball.
6 6
7lib-y:= 7lib-y:=
8lib-$(CONFIG_CHPST) += chpst.o 8lib-$(CONFIG_RUNSV) += runsv.o runit_lib.o
9lib-$(CONFIG_RUNSVDIR) += runsvdir.o runit_lib.o
10lib-$(CONFIG_SV) += sv.o runit_lib.o
9lib-$(CONFIG_SVLOGD) += svlogd.o runit_lib.o 11lib-$(CONFIG_SVLOGD) += svlogd.o runit_lib.o
12lib-$(CONFIG_CHPST) += chpst.o
diff --git a/runit/runit_lib.c b/runit/runit_lib.c
index 322bef858..c95d641f1 100644
--- a/runit/runit_lib.c
+++ b/runit/runit_lib.c
@@ -519,6 +519,7 @@ void taia_uint(struct taia *t,unsigned s)
519 519
520 520
521/*** stralloc_cat.c ***/ 521/*** stralloc_cat.c ***/
522#if 0
522 523
523int stralloc_cat(stralloc *sato,const stralloc *safrom) 524int stralloc_cat(stralloc *sato,const stralloc *safrom)
524{ 525{
@@ -577,6 +578,7 @@ int stralloc_copys(stralloc *sa,const char *s)
577 578
578GEN_ALLOC_append(stralloc,char,s,len,a,i,n,x,30,stralloc_readyplus,stralloc_append) 579GEN_ALLOC_append(stralloc,char,s,len,a,i,n,x,30,stralloc_readyplus,stralloc_append)
579 580
581#endif /* stralloc */
580 582
581/*** iopause.c ***/ 583/*** iopause.c ***/
582 584
@@ -643,7 +645,7 @@ int ndelay_on(int fd)
643 645
644int open_append(const char *fn) 646int open_append(const char *fn)
645{ 647{
646 return open(fn,O_WRONLY | O_NDELAY | O_APPEND | O_CREAT,0600); 648 return open(fn, O_WRONLY|O_NDELAY|O_APPEND|O_CREAT, 0600);
647} 649}
648 650
649 651
@@ -651,7 +653,7 @@ int open_append(const char *fn)
651 653
652int open_read(const char *fn) 654int open_read(const char *fn)
653{ 655{
654 return open(fn,O_RDONLY | O_NDELAY); 656 return open(fn, O_RDONLY|O_NDELAY);
655} 657}
656 658
657 659
@@ -667,12 +669,12 @@ int open_trunc(const char *fn)
667 669
668int open_write(const char *fn) 670int open_write(const char *fn)
669{ 671{
670 return open(fn,O_WRONLY | O_NDELAY); 672 return open(fn, O_WRONLY|O_NDELAY);
671} 673}
672 674
673 675
674/*** openreadclose.c ***/ 676/*** openreadclose.c ***/
675 677#if 0
676int openreadclose(const char *fn,stralloc *sa,unsigned bufsize) 678int openreadclose(const char *fn,stralloc *sa,unsigned bufsize)
677{ 679{
678 int fd; 680 int fd;
@@ -684,10 +686,11 @@ int openreadclose(const char *fn,stralloc *sa,unsigned bufsize)
684 if (readclose(fd,sa,bufsize) == -1) return -1; 686 if (readclose(fd,sa,bufsize) == -1) return -1;
685 return 1; 687 return 1;
686} 688}
689#endif
687 690
688 691
689/*** pathexec_env.c ***/ 692/*** pathexec_env.c ***/
690 693#if 0
691static stralloc plus; 694static stralloc plus;
692static stralloc tmp; 695static stralloc tmp;
693 696
@@ -748,10 +751,10 @@ void pathexec(char **argv)
748 pathexec_run(*argv,argv,e); 751 pathexec_run(*argv,argv,e);
749 free(e); 752 free(e);
750} 753}
751 754#endif
752 755
753/*** pathexec_run.c ***/ 756/*** pathexec_run.c ***/
754 757#if 0
755static stralloc tmp; 758static stralloc tmp;
756 759
757void pathexec_run(const char *file,char *const *argv,char *const *envp) 760void pathexec_run(const char *file,char *const *argv,char *const *envp)
@@ -792,7 +795,7 @@ void pathexec_run(const char *file,char *const *argv,char *const *envp)
792 path += 1; 795 path += 1;
793 } 796 }
794} 797}
795 798#endif
796 799
797/*** pmatch.c ***/ 800/*** pmatch.c ***/
798 801
@@ -853,7 +856,7 @@ int prot_uid(int uid)
853 856
854 857
855/*** readclose.c ***/ 858/*** readclose.c ***/
856 859#if 0
857int readclose_append(int fd,stralloc *sa,unsigned bufsize) 860int readclose_append(int fd,stralloc *sa,unsigned bufsize)
858{ 861{
859 int r; 862 int r;
@@ -871,7 +874,7 @@ int readclose(int fd,stralloc *sa,unsigned bufsize)
871 if (!stralloc_copys(sa,"")) { close(fd); return -1; } 874 if (!stralloc_copys(sa,"")) { close(fd); return -1; }
872 return readclose_append(fd,sa,bufsize); 875 return readclose_append(fd,sa,bufsize);
873} 876}
874 877#endif
875 878
876/*** scan_ulong.c ***/ 879/*** scan_ulong.c ***/
877 880
diff --git a/runit/runit_lib.h b/runit/runit_lib.h
index d306164ea..1f911919d 100644
--- a/runit/runit_lib.h
+++ b/runit/runit_lib.h
@@ -233,7 +233,7 @@ int ta_append(ta *x,const type *i) \
233 233
234 234
235/*** stralloc.h ***/ 235/*** stralloc.h ***/
236 236#if 0
237GEN_ALLOC_typedef(stralloc,char,s,len,a) 237GEN_ALLOC_typedef(stralloc,char,s,len,a)
238 238
239extern int stralloc_ready(stralloc *,unsigned); 239extern int stralloc_ready(stralloc *,unsigned);
@@ -256,7 +256,7 @@ extern int stralloc_catlong0(stralloc *,long,unsigned);
256#define stralloc_catuint0(sa,i,n) (stralloc_catulong0((sa),(i),(n))) 256#define stralloc_catuint0(sa,i,n) (stralloc_catulong0((sa),(i),(n)))
257#define stralloc_catint0(sa,i,n) (stralloc_catlong0((sa),(i),(n))) 257#define stralloc_catint0(sa,i,n) (stralloc_catlong0((sa),(i),(n)))
258#define stralloc_catint(sa,i) (stralloc_catlong0((sa),(i),0)) 258#define stralloc_catint(sa,i) (stralloc_catlong0((sa),(i),0))
259 259#endif
260 260
261/*** iopause.h ***/ 261/*** iopause.h ***/
262 262
@@ -290,9 +290,9 @@ extern int open_write(const char *);
290 290
291 291
292/*** openreadclose.h ***/ 292/*** openreadclose.h ***/
293 293#if 0
294extern int openreadclose(const char *,stralloc *,unsigned); 294extern int openreadclose(const char *,stralloc *,unsigned);
295 295#endif
296 296
297/*** pathexec.h ***/ 297/*** pathexec.h ***/
298 298
@@ -313,10 +313,10 @@ extern int prot_uid(int);
313 313
314 314
315/*** readclose.h ***/ 315/*** readclose.h ***/
316 316#if 0
317extern int readclose_append(int,stralloc *,unsigned); 317extern int readclose_append(int,stralloc *,unsigned);
318extern int readclose(int,stralloc *,unsigned); 318extern int readclose(int,stralloc *,unsigned);
319 319#endif
320 320
321/*** scan.h ***/ 321/*** scan.h ***/
322 322