Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 159936 | Differences between
and this patch

Collapse All | Expand All

(-)minit-0.10/Makefile (-1 / +1 lines)
Lines 78-84 Link Here
78
	install minit pidfilehack $(DESTDIR)/sbin
78
	install minit pidfilehack $(DESTDIR)/sbin
79
	install write_proc hard-reboot minit-update $(DESTDIR)/sbin
79
	install write_proc hard-reboot minit-update $(DESTDIR)/sbin
80
	install msvc serdo $(DESTDIR)/bin
80
	install msvc serdo $(DESTDIR)/bin
81
	install -m 4750 shutdown $(DESTDIR)/sbin
81
	if test -f $(DESTDIR)/sbin/shutdown; then install shutdown $(DESTDIR)/sbin/mshutdown; else install shutdown $(DESTDIR)/sbin/shutdown; fi
82
	test -f $(DESTDIR)/sbin/init || ln $(DESTDIR)/sbin/minit $(DESTDIR)/sbin/init
82
	test -f $(DESTDIR)/sbin/init || ln $(DESTDIR)/sbin/minit $(DESTDIR)/sbin/init
83
	install -m 644 hard-reboot.8 minit-list.8 minit-shutdown.8 minit-update.8 minit.8 msvc.8 pidfilehack.8 serdo.8 $(DESTDIR)$(MANDIR)/man8
83
	install -m 644 hard-reboot.8 minit-list.8 minit-shutdown.8 minit-update.8 minit.8 msvc.8 pidfilehack.8 serdo.8 $(DESTDIR)$(MANDIR)/man8
84
84
(-)minit-0.10/minit.c (-2 / +17 lines)
Lines 30-38 Link Here
30
extern void* __libc_malloc(size_t size);
30
extern void* __libc_malloc(size_t size);
31
extern void* __libc_realloc(void* x,size_t size);
31
extern void* __libc_realloc(void* x,size_t size);
32
extern void __libc_free(void* x);
32
extern void __libc_free(void* x);
33
static char malloc_buf[2048];
33
static char malloc_buf[1024];
34
static unsigned long n;
34
static unsigned long n;
35
static struct process procbuf[100];
35
static struct process procbuf[50];
36
void *malloc(size_t size) {
36
void *malloc(size_t size) {
37
  if (n+size<sizeof(malloc_buf)) {
37
  if (n+size<sizeof(malloc_buf)) {
38
    char* tmp=malloc_buf+n;
38
    char* tmp=malloc_buf+n;
Lines 237-242 Link Here
237
      req.tv_nsec=500000000;
237
      req.tv_nsec=500000000;
238
      nanosleep(&req,0);
238
      nanosleep(&req,0);
239
    }
239
    }
240
    if ((fd=open("in",O_RDONLY))!=-1) {
241
      dup2(fd,0);
242
      fcntl(0,F_SETFD,0);
243
    }
244
    if ((fd=open("out",O_WRONLY))!=-1) {
245
      dup2(fd,1);
246
      dup2(fd,2);
247
      fcntl(1,F_SETFD,0);
248
      fcntl(2,F_SETFD,0);
249
    }
250
    if (!openreadclose("nice",&s,&len)) {
251
      int n=atoi(s);
252
      nice(n);
253
      s=0;
254
    }
240
    if (!openreadclose("params",&s,&len)) {
255
    if (!openreadclose("params",&s,&len)) {
241
      argv=split(s,'\n',&argc,2,1);
256
      argv=split(s,'\n',&argc,2,1);
242
      if (argv[argc-1]) argv[argc-1]=0; else argv[argc]=0;
257
      if (argv[argc-1]) argv[argc-1]=0; else argv[argc]=0;
(-)minit-0.10/msvc.c (-1 / +1 lines)
Lines 326-332 Link Here
326
	  }
326
	  }
327
	  tmp[fmt_ulong(tmp,sig)]=0;
327
	  tmp[fmt_ulong(tmp,sig)]=0;
328
	  tmp2[fmt_ulong(tmp2,pid)]=0;
328
	  tmp2[fmt_ulong(tmp2,pid)]=0;
329
	  carp(argv[i],": could not send signal ",tmp," to PID ",pid,": ",s);
329
	  carp(argv[i],": could not send signal ",tmp," to PID ",tmp2,": ",s);
330
	  ret=1;
330
	  ret=1;
331
	}
331
	}
332
      }
332
      }
(-)minit-0.10/README (+17 lines)
Lines 1-3 Link Here
1
To compile this, you need to have libowfat (http://www.fefe.de/libowfat/)!
2
1
Each service gets its own directory under /etc/minit (change this in the
3
Each service gets its own directory under /etc/minit (change this in the
2
source, it's a #define right at the start of minit.c).
4
source, it's a #define right at the start of minit.c).
3
5
Lines 46-51 Link Here
46
    process dies and is restarted, no log entries will be lost and there
48
    process dies and is restarted, no log entries will be lost and there
47
    will be no SIGPIPE.
49
    will be no SIGPIPE.
48
50
51
  nice
52
53
    a plain text file containing the value to add to the nice level via the
54
    nice systemcall.
55
56
  in
57
58
    this file is used for stdin.
59
60
  out
61
62
    this file is used for stdout and stderr.
63
    e.g. a symlink to /dev/null
64
65
49
Please see http://cr.yp.to/daemontools/multilog.html for a very good
66
Please see http://cr.yp.to/daemontools/multilog.html for a very good
50
logging tool.
67
logging tool.
51
68

Return to bug 159936