supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* OT: /package and /service
@ 2005-04-19 18:39 Payal Rathod
  2005-04-19 18:54 ` Paul Jarc
  0 siblings, 1 reply; 4+ messages in thread
From: Payal Rathod @ 2005-04-19 18:39 UTC (permalink / raw)


Hi,
I am not sure where exactly these questions belong to. I am taking the 
liberty to post them here. Please excuse.

1. Why is /package made with sticky bit set?

2. In /service/<process>/supervise/ there are 4 files,
2 fifos - control and ok
2 normal files - lock and status
Why are fifos used here? Which document explains this?

3. On cr.yp.to it says that,
"svscanboot starts svscan in the /service directory, ..."
"svscan starts one supervise process ... "
"svscan is designed to run forever. "

I understand that if process under service dies svscan starts it again.  
But what about svscan itself? What if it dies? Who restarts it? Reading 
the script /command/svscanboot did not help much.
Also is there any documentation which says why are there so many dots in 
that script and what do they signify?

Thanks in advance.
With warm regards,
-Payal



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: OT: /package and /service
  2005-04-19 18:39 OT: /package and /service Payal Rathod
@ 2005-04-19 18:54 ` Paul Jarc
  2005-04-19 19:03   ` Payal Rathod
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Jarc @ 2005-04-19 18:54 UTC (permalink / raw)
  Cc: supervision

Payal Rathod <payal-supervision@scriptkitchen.com> wrote:
> 1. Why is /package made with sticky bit set?

To simplify code that looks for package directories.  Category
directories (which may contain packages or subcategories) are sticky,
and package directories are not sticky.  /package contains categories,
so its consistent to make it sticky.  Otherwise, code would have to
treat /package itself specially instead of just checkign for the
sticky bit to decide whether to descend into subdirectories.

> 2. In /service/<process>/supervise/ there are 4 files,
> 2 fifos - control and ok
> 2 normal files - lock and status
> Why are fifos used here? Which document explains this?

It's not documented.  supervise/ok is used by svok and svc to detect
whether supervise is running.  A regular file wouldn't work for this,
because the file could be in the same state even if supervise died.

supervise/control is used by svc to send commands to supervise.  There
are ways to use regular files instead, but the pipe is simpler.

> But what about svscan itself? What if it dies? Who restarts it?

I run svscan as process 1, so I don't have to worry about it.

With svscanboot, I believe the intent is that init (on SysV systems,
anyway) would restart svscan if it dies.  But it won't actually be
restarted until readproctitle exits too, and that won't normally
happen until all supervises exit.

> Also is there any documentation which says why are there so many dots in 
> that script and what do they signify?

<URL:http://cr.yp.to/daemontools/readproctitle.html>
Those dots are replaced by the data read by readproctitle.  The number
of dots determines how much of that log you'll be able to see at one
time.


paul


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: OT: /package and /service
  2005-04-19 18:54 ` Paul Jarc
@ 2005-04-19 19:03   ` Payal Rathod
  2005-04-19 19:13     ` Paul Jarc
  0 siblings, 1 reply; 4+ messages in thread
From: Payal Rathod @ 2005-04-19 19:03 UTC (permalink / raw)


On Tue, Apr 19, 2005 at 02:54:46PM -0400, Paul Jarc wrote:
> To simplify code that looks for package directories.  Category
> directories (which may contain packages or subcategories) are sticky,
> and package directories are not sticky.  /package contains categories,
[...]

Woww! wait you lost me. Can you brief a little bit more on this? What is 
category directory?

> It's not documented.  supervise/ok is used by svok and svc to detect
[...]

Ok

> I run svscan as process 1, so I don't have to worry about it.
> 
> With svscanboot, I believe the intent is that init (on SysV systems,
> anyway) would restart svscan if it dies.  But it won't actually be
> restarted until readproctitle exits too, and that won't normally
> happen until all supervises exit.
[...]

Right, infact I guess it would start svscanboot which would in turn 
start svscan.

With warm regards,
-Payal


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: OT: /package and /service
  2005-04-19 19:03   ` Payal Rathod
@ 2005-04-19 19:13     ` Paul Jarc
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Jarc @ 2005-04-19 19:13 UTC (permalink / raw)
  Cc: supervision

Payal Rathod <payal-supervision@scriptkitchen.com> wrote:
> What is category directory?

It's described here:
<URL:http://cr.yp.to/slashpackage/names.html>
<URL:http://cr.yp.to/slashpackage/management.html>

package@list.cr.yp.to would be a better place if you have more
questions.


paul


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-04-19 19:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-19 18:39 OT: /package and /service Payal Rathod
2005-04-19 18:54 ` Paul Jarc
2005-04-19 19:03   ` Payal Rathod
2005-04-19 19:13     ` Paul Jarc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).