supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* runit feature request: sigquit
@ 2004-03-22 14:55 Wayne Marshall
  2004-03-22 16:55 ` Charlie Brady
  2004-03-24 21:58 ` Gerrit Pape
  0 siblings, 2 replies; 6+ messages in thread
From: Wayne Marshall @ 2004-03-22 14:55 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 462 bytes --]

2004.03.22
(Mon)

Hi,

Attached is a small patch for runit-1.0.1 to add SIGQUIT
capability to the package.

This is useful for a mathopd service, where SIGQUIT is used to
toggle debug output in the logs.  See:

  http://thedjbway.org/services/mathopd.html

for more information.

Would it be possible to add this feature into the distribution?

Thank you!

Wayne

-- 
Wayne Marshall
guinix international
http://www.guinix.com/
"Computing Without Borders..."





[-- Attachment #2: runit-1.0.1.sigquit.patch --]
[-- Type: application/octet-stream, Size: 1616 bytes --]

# runit-1.0.1.sigquit.patch
#
# this patch adds SIGQUIT recognition to runsv and runsvctrl
#
# apply this patch:
#
#   # cd /package/admin/runit-1.0.1
#   # patch -p1 < /path/to/this/patch
#
#
# then (re)compile/(re)install runit:
#
#   # package/install
#
#
# notes:
#
#  * this patch does not update the documentation
#
#  * the mathopd (web server) uses SIGQUIT to
#    toggle debug output in logs; see:
#
#      http://thedjbway.org/services/mathopd.html
#
# wcm, 2004.03.22 - 2004.03.22
# ===  
diff -ur runit-1.0.1/src/runsvctrl.c runit-1.0.1.sigquit/src/runsvctrl.c
--- runit-1.0.1/src/runsvctrl.c	Sun Mar  7 13:41:09 2004
+++ runit-1.0.1.sigquit/src/runsvctrl.c	Mon Mar 22 13:33:24 2004
@@ -3,7 +3,7 @@
 #include "error.h"
 #include "open.h"
 
-#define USAGE " u|d|o|p|c|h|a|i|1|2|t|k|x|e service ..."
+#define USAGE " u|d|o|p|c|h|a|i|q|1|2|t|k|x|e service ..."
 
 #define VERSION "$Id: runsvctrl.c,v 1.6 2003/05/04 09:41:10 pape Exp $"
 
@@ -53,7 +53,7 @@
 
   switch ((c =**argv)) {
   case 'u': case 'd': case 'o': case 'x': case 'e': case 'p': case 'c':
-  case 'h': case 'a': case 'i': case 't': case 'k': case '1': case '2':
+  case 'h': case 'a': case 'i': case 't': case 'k': case 'q': case '1': case '2':
     break;
   default:
     usage();
diff -ur runit-1.0.1/src/runsvctrl.dist runit-1.0.1.sigquit/src/runsvctrl.dist
--- runit-1.0.1/src/runsvctrl.dist	Sun Mar  7 13:41:09 2004
+++ runit-1.0.1.sigquit/src/runsvctrl.dist	Mon Mar 22 13:34:11 2004
@@ -1,4 +1,4 @@
-usage: runsvctrl u|d|o|p|c|h|a|i|1|2|t|k|x|e service ...
+usage: runsvctrl u|d|o|p|c|h|a|i|q|1|2|t|k|x|e service ...
 
 1
 starting

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

* Re: runit feature request: sigquit
  2004-03-22 14:55 runit feature request: sigquit Wayne Marshall
@ 2004-03-22 16:55 ` Charlie Brady
  2004-03-23  5:33   ` Wayne Marshall
  2004-03-24 21:58 ` Gerrit Pape
  1 sibling, 1 reply; 6+ messages in thread
From: Charlie Brady @ 2004-03-22 16:55 UTC (permalink / raw)
  Cc: supervision


On 22 Mar 2004, Wayne Marshall wrote:

> Attached is a small patch for runit-1.0.1 to add SIGQUIT
> capability to the package.
> 
> This is useful for a mathopd service, where SIGQUIT is used to
> toggle debug output in the logs.  See:
> 
>   http://thedjbway.org/services/mathopd.html
> 
> for more information.

Wouldn't it be a good idea to fix mathopd, reversing the semantics of
SIGQUIT and SIGUSR2? QUIT means "quit", right?

--
Charlie



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

* Re: runit feature request: sigquit
  2004-03-22 16:55 ` Charlie Brady
@ 2004-03-23  5:33   ` Wayne Marshall
  2004-03-23  7:14     ` Nico Schottelius
  0 siblings, 1 reply; 6+ messages in thread
From: Wayne Marshall @ 2004-03-23  5:33 UTC (permalink / raw)


Hi,

I don't feel it is up to me to say mathopd--or any other
application using SIGQUIT--is "broken".  The default action of
SIGQUIT is to dump core.  But an application is free to trap
these signals for whatever.

Even if Michiel "fixed" his program, and switched the use of
SIGUSR2 and SIGQUIT, we would still want to have the SIGQUIT
capability to effect a "graceful" shutdown.

(Never mind, of course, that such a "fix" would be terribly
annoying to the installed base of mathopd users...)

Wayne


On Mon, 22 Mar 2004 11:55:32 -0500 (EST)
Charlie Brady <charlieb-supervision@e-smith.com> wrote:

> 
> On 22 Mar 2004, Wayne Marshall wrote:
> 
> > Attached is a small patch for runit-1.0.1 to add SIGQUIT
> > capability to the package.
> > 
> > This is useful for a mathopd service, where SIGQUIT is used
> > to toggle debug output in the logs.  See:
> > 
> >   http://thedjbway.org/services/mathopd.html
> > 
> > for more information.
> 
> Wouldn't it be a good idea to fix mathopd, reversing the
> semantics of SIGQUIT and SIGUSR2? QUIT means "quit", right?
> 
> --
> Charlie
> 
> 


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

* Re: runit feature request: sigquit
  2004-03-23  5:33   ` Wayne Marshall
@ 2004-03-23  7:14     ` Nico Schottelius
  0 siblings, 0 replies; 6+ messages in thread
From: Nico Schottelius @ 2004-03-23  7:14 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 643 bytes --]

Wayne Marshall [Tue, Mar 23, 2004 at 08:33:02AM +0300]:
> [SIGQUIT removal vs. compatibility]

Using USR1/2 for handling events is quite normal for *nix daemons.
Changing from QUIT to USR2 would make it somehow 'cleaner', as
you use the expected signal(s).

That you have to break compatibility with older version with such
a change should be clear be and well announced (README/mailing
list/Changelog).

Just my good morning thoughts and my introduction to the list,

Nico

-- 
Keep it simple & stupid, use what's available.
pgp: 8D0E E27A          | Nico Schottelius
http://nerd-hosting.net | http://linux.schottelius.org

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: runit feature request: sigquit
  2004-03-22 14:55 runit feature request: sigquit Wayne Marshall
  2004-03-22 16:55 ` Charlie Brady
@ 2004-03-24 21:58 ` Gerrit Pape
  2004-03-25  7:11   ` Wayne Marshall
  1 sibling, 1 reply; 6+ messages in thread
From: Gerrit Pape @ 2004-03-24 21:58 UTC (permalink / raw)


On Mon, Mar 22, 2004 at 05:55:25PM +0300, Wayne Marshall wrote:
> Attached is a small patch for runit-1.0.1 to add SIGQUIT
> capability to the package.

It looks like the patch isn't complete?  I think you have patched runsv
also, not only runsvctrl.  I'll consider including it.

Thanks, Gerrit.


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

* Re: runit feature request: sigquit
  2004-03-24 21:58 ` Gerrit Pape
@ 2004-03-25  7:11   ` Wayne Marshall
  0 siblings, 0 replies; 6+ messages in thread
From: Wayne Marshall @ 2004-03-25  7:11 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 617 bytes --]

2004.03.25
(Thu)

Gerrit,

Hi, yes the patch file submitted was missing the diffs to
runsv.c; the complete patch file is attached.

My apologies for the error.  Thank you for considering the
addition!

Stay well,

Wayne


On Wed, 24 Mar 2004 21:58:39 +0000
Gerrit Pape <pape@smarden.org> wrote:

> On Mon, Mar 22, 2004 at 05:55:25PM +0300, Wayne Marshall wrote:
> > Attached is a small patch for runit-1.0.1 to add SIGQUIT
> > capability to the package.
> 
> It looks like the patch isn't complete?  I think you have
> patched runsv also, not only runsvctrl.  I'll consider
> including it.
> 
> Thanks, Gerrit.
> 
> 

[-- Attachment #2: runit-1.0.1.sigquit.patch --]
[-- Type: application/octet-stream, Size: 2051 bytes --]

# runit-1.0.1.sigquit.patch
#
# this patch adds SIGQUIT recognition to runsv and runsvctrl
#
# apply this patch:
#
#   # cd /package/admin/runit-1.0.1
#   # patch -p1 < /path/to/this/patch
#
#
# then (re)compile/(re)install runit:
#
#   # package/install
#
#
# notes:
#
#  * this patch does not update the documentation
#
#  * the mathopd (web server) uses SIGQUIT to
#    toggle debug output in logs; see:
#
#      http://thedjbway.org/services/mathopd.html
#
# wcm, 2004.03.22 - 2004.03.25
# ===
diff -ur runit-1.0.1/src/runsv.c runit-1.0.1.sigquit/src/runsv.c
--- runit-1.0.1/src/runsv.c	Sun Mar  7 13:41:09 2004
+++ runit-1.0.1.sigquit/src/runsv.c	Mon Mar 22 13:35:44 2004
@@ -308,6 +308,9 @@
   case 'i': /* sig int */
     if (s->pid) kill(s->pid, SIGINT);
     break;
+  case 'q': /* sig quit */
+    if (s->pid) kill(s->pid, SIGQUIT);
+    break;
   case '1': /* sig usr1 */
     if (s->pid) kill(s->pid, SIGUSR1);
     break;
diff -ur runit-1.0.1/src/runsvctrl.c runit-1.0.1.sigquit/src/runsvctrl.c
--- runit-1.0.1/src/runsvctrl.c	Sun Mar  7 13:41:09 2004
+++ runit-1.0.1.sigquit/src/runsvctrl.c	Mon Mar 22 13:35:44 2004
@@ -3,7 +3,7 @@
 #include "error.h"
 #include "open.h"
 
-#define USAGE " u|d|o|p|c|h|a|i|1|2|t|k|x|e service ..."
+#define USAGE " u|d|o|p|c|h|a|i|q|1|2|t|k|x|e service ..."
 
 #define VERSION "$Id: runsvctrl.c,v 1.6 2003/05/04 09:41:10 pape Exp $"
 
@@ -53,7 +53,7 @@
 
   switch ((c =**argv)) {
   case 'u': case 'd': case 'o': case 'x': case 'e': case 'p': case 'c':
-  case 'h': case 'a': case 'i': case 't': case 'k': case '1': case '2':
+  case 'h': case 'a': case 'i': case 't': case 'k': case 'q': case '1': case '2':
     break;
   default:
     usage();
diff -ur runit-1.0.1/src/runsvctrl.dist runit-1.0.1.sigquit/src/runsvctrl.dist
--- runit-1.0.1/src/runsvctrl.dist	Sun Mar  7 13:41:09 2004
+++ runit-1.0.1.sigquit/src/runsvctrl.dist	Mon Mar 22 13:35:44 2004
@@ -1,4 +1,4 @@
-usage: runsvctrl u|d|o|p|c|h|a|i|1|2|t|k|x|e service ...
+usage: runsvctrl u|d|o|p|c|h|a|i|q|1|2|t|k|x|e service ...
 
 1
 starting

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

end of thread, other threads:[~2004-03-25  7:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-22 14:55 runit feature request: sigquit Wayne Marshall
2004-03-22 16:55 ` Charlie Brady
2004-03-23  5:33   ` Wayne Marshall
2004-03-23  7:14     ` Nico Schottelius
2004-03-24 21:58 ` Gerrit Pape
2004-03-25  7:11   ` Wayne Marshall

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).