* [gentoo-dev] Starting/stopping services
@ 2003-01-18 17:52 Andy Arbon
2003-01-18 18:09 ` Caleb Shay
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Andy Arbon @ 2003-01-18 17:52 UTC (permalink / raw
To: gentoo-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
I'd like to mention a problem that I see occasionally and see if anyone
else considers it annoying enough to have fixed somehow.
The problem is that services can't be stopped (via /etc/init.d/* ) if
the process they started has died since the init script started it.
Presumably the scripts try to terminate the process, find that it's not
there anymore and exit with an error, but this means that there is no
way (aside from starting a process with the correct name then letting
the script kill it) to start the service again until the system
restarts, which proves very annoying if you're doing anything which
causes services to die frequently (in my case I'm playing with the
lircd, which is a little flaky sometimes).
Is there anything that can be done about this? If the script tries to
stop a service and finds the process has died then it probably should
report an error, but I think it should also register that the service
has stopped so that it can be restarted.
Cheers,
Andy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE+KZRqX3TTUvZURBERAu1/AKCOJ34Hz/aeL/piAOd2lOgPJSnnhgCfcogr
0D28blwIFmGEHKU+SfRs6O4=
=5djP
-----END PGP SIGNATURE-----
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] Starting/stopping services
2003-01-18 17:52 [gentoo-dev] Starting/stopping services Andy Arbon
@ 2003-01-18 18:09 ` Caleb Shay
2003-01-18 18:09 ` Burton Samograd
2003-01-18 18:11 ` will
2 siblings, 0 replies; 9+ messages in thread
From: Caleb Shay @ 2003-01-18 18:09 UTC (permalink / raw
To: gentoo-dev
/etc/init.d/servicename zap
On Sat, 2003-01-18 at 12:52, Andy Arbon wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>
> I'd like to mention a problem that I see occasionally and see if anyone
> else considers it annoying enough to have fixed somehow.
>
> The problem is that services can't be stopped (via /etc/init.d/* ) if
> the process they started has died since the init script started it.
>
> Presumably the scripts try to terminate the process, find that it's not
> there anymore and exit with an error, but this means that there is no
> way (aside from starting a process with the correct name then letting
> the script kill it) to start the service again until the system
> restarts, which proves very annoying if you're doing anything which
> causes services to die frequently (in my case I'm playing with the
> lircd, which is a little flaky sometimes).
>
> Is there anything that can be done about this? If the script tries to
> stop a service and finds the process has died then it probably should
> report an error, but I think it should also register that the service
> has stopped so that it can be restarted.
>
> Cheers,
>
> Andy
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQE+KZRqX3TTUvZURBERAu1/AKCOJ34Hz/aeL/piAOd2lOgPJSnnhgCfcogr
> 0D28blwIFmGEHKU+SfRs6O4=
> =5djP
> -----END PGP SIGNATURE-----
>
>
> --
> gentoo-dev@gentoo.org mailing list
--
Caleb Shay <caleb@webninja.com>
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] Starting/stopping services
2003-01-18 17:52 [gentoo-dev] Starting/stopping services Andy Arbon
2003-01-18 18:09 ` Caleb Shay
@ 2003-01-18 18:09 ` Burton Samograd
2003-01-18 18:11 ` will
2 siblings, 0 replies; 9+ messages in thread
From: Burton Samograd @ 2003-01-18 18:09 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 809 bytes --]
On Sat, Jan 18, 2003 at 05:52:43PM +0000, Andy Arbon wrote:
> Presumably the scripts try to terminate the process, find that it's not
> there anymore and exit with an error, but this means that there is no
> way (aside from starting a process with the correct name then letting
> the script kill it) to start the service again until the system
> restarts, which proves very annoying if you're doing anything which
> causes services to die frequently (in my case I'm playing with the
> lircd, which is a little flaky sometimes).
If I understand what you are saying, this can be solved by giving the
init script the zap command (ie. /etc/init.d/lircd zap), which resets
its run state and lets you restart it normally.
--
burton samograd
kruhft@kruhft.dyndns.org
http://kruhftwerk.dyndns.org
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] Starting/stopping services
2003-01-18 17:52 [gentoo-dev] Starting/stopping services Andy Arbon
2003-01-18 18:09 ` Caleb Shay
2003-01-18 18:09 ` Burton Samograd
@ 2003-01-18 18:11 ` will
2003-01-21 8:56 ` Matt Tucker
2 siblings, 1 reply; 9+ messages in thread
From: will @ 2003-01-18 18:11 UTC (permalink / raw
To: Andy Arbon; +Cc: gentoo-dev
They can't be stopped because there's nothing to be stopped. However, zap
should work.
If you do "/sbin/runscript", then it'll tell you all about runscript
stuff.
/will
On Sat, 18 Jan 2003, Andy Arbon wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>
> I'd like to mention a problem that I see occasionally and see if anyone
> else considers it annoying enough to have fixed somehow.
>
> The problem is that services can't be stopped (via /etc/init.d/* ) if
> the process they started has died since the init script started it.
>
> Presumably the scripts try to terminate the process, find that it's not
> there anymore and exit with an error, but this means that there is no
> way (aside from starting a process with the correct name then letting
> the script kill it) to start the service again until the system
> restarts, which proves very annoying if you're doing anything which
> causes services to die frequently (in my case I'm playing with the
> lircd, which is a little flaky sometimes).
>
> Is there anything that can be done about this? If the script tries to
> stop a service and finds the process has died then it probably should
> report an error, but I think it should also register that the service
> has stopped so that it can be restarted.
>
> Cheers,
>
> Andy
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQE+KZRqX3TTUvZURBERAu1/AKCOJ34Hz/aeL/piAOd2lOgPJSnnhgCfcogr
> 0D28blwIFmGEHKU+SfRs6O4=
> =5djP
> -----END PGP SIGNATURE-----
>
>
> --
> gentoo-dev@gentoo.org mailing list
>
--
whatever it is, you can find it at http://www.bluesock.org/~willg/
except Will--you can only see him in real life.
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] Starting/stopping services
2003-01-18 18:11 ` will
@ 2003-01-21 8:56 ` Matt Tucker
2003-01-21 9:09 ` Mike Frysinger
0 siblings, 1 reply; 9+ messages in thread
From: Matt Tucker @ 2003-01-21 8:56 UTC (permalink / raw
To: gentoo-dev
-- will <willg@bluesock.org> spake thusly:
> They can't be stopped because there's nothing to be stopped.
> However, zap should work.
>
> If you do "/sbin/runscript", then it'll tell you all about runscript
> stuff.
Is there any particularly good reason that stop doesn't just do this
automatically?
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] Starting/stopping services
2003-01-21 8:56 ` Matt Tucker
@ 2003-01-21 9:09 ` Mike Frysinger
2003-01-21 15:39 ` Dylan Carlson
0 siblings, 1 reply; 9+ messages in thread
From: Mike Frysinger @ 2003-01-21 9:09 UTC (permalink / raw
To: gentoo-dev
this allows for better control/checking via scripts and what not ...
if theres an error/issue stopping a service, i want to know about it ... but
if you dont care, just zap it ...
-mike
On Tuesday 21 January 2003 03:56, Matt Tucker wrote:
> -- will <willg@bluesock.org> spake thusly:
> > They can't be stopped because there's nothing to be stopped.
> > However, zap should work.
> >
> > If you do "/sbin/runscript", then it'll tell you all about runscript
> > stuff.
>
> Is there any particularly good reason that stop doesn't just do this
> automatically?
>
>
> --
> gentoo-dev@gentoo.org mailing list
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] Starting/stopping services
2003-01-21 9:09 ` Mike Frysinger
@ 2003-01-21 15:39 ` Dylan Carlson
2003-01-21 20:15 ` J Robert Ray
0 siblings, 1 reply; 9+ messages in thread
From: Dylan Carlson @ 2003-01-21 15:39 UTC (permalink / raw
To: vapier, gentoo-dev
On Tuesday 21 January 2003 04:09 am, Mike Frysinger wrote:
> this allows for better control/checking via scripts and what not ...
>
> if theres an error/issue stopping a service, i want to know about it ...
> but if you dont care, just zap it ...
> -mike
>
> On Tuesday 21 January 2003 03:56, Matt Tucker wrote:
> > -- will <willg@bluesock.org> spake thusly:
> > > They can't be stopped because there's nothing to be stopped.
> > > However, zap should work.
> > >
> > > If you do "/sbin/runscript", then it'll tell you all about runscript
> > > stuff.
> >
> > Is there any particularly good reason that stop doesn't just do this
> > automatically?
I would like to have the ability to zap a service as "started". There are
some scenarios where a startup script will fire off many background
processes and might fail on one or two of them.
The script will be flagged as "stopped", but the background processes that
are running will keep running. So if there was way to set the script as
"started", you could do a normal stop to kill off whatever did manage to
start, instead of manually killing off processes.
Cheers,
Dylan Carlson [absinthe@pobox.com]
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] Starting/stopping services
2003-01-21 15:39 ` Dylan Carlson
@ 2003-01-21 20:15 ` J Robert Ray
2003-01-21 21:15 ` Dylan Carlson
0 siblings, 1 reply; 9+ messages in thread
From: J Robert Ray @ 2003-01-21 20:15 UTC (permalink / raw
To: absinthe; +Cc: gentoo-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Dylan Carlson wrote:
|
| I would like to have the ability to zap a service as "started". There
are
| some scenarios where a startup script will fire off many background
| processes and might fail on one or two of them.
|
| The script will be flagged as "stopped", but the background processes
that
| are running will keep running. So if there was way to set the script as
| "started", you could do a normal stop to kill off whatever did manage to
| start, instead of manually killing off processes.
This sounds like something that would be better solved by breaking the
script up into multiple init scripts for each background process, and
then set the dependencies as needed.
Are you referring to a package in portage or a custom job?
- - Robert
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.1.90-nr1 (Windows XP)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE+LapEbv6Y11NqSv8RAqRIAJwKGbPDTi9pY+9i72pLrudw+0kXsgCfTdac
HNAY9LqonOtLrHBKWjg9u2k=
=F8Ca
-----END PGP SIGNATURE-----
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] Starting/stopping services
2003-01-21 20:15 ` J Robert Ray
@ 2003-01-21 21:15 ` Dylan Carlson
0 siblings, 0 replies; 9+ messages in thread
From: Dylan Carlson @ 2003-01-21 21:15 UTC (permalink / raw
To: J Robert Ray; +Cc: gentoo-dev
On Tuesday 21 January 2003 03:15 pm, J Robert Ray wrote:
> This sounds like something that would be better solved by breaking the
> script up into multiple init scripts for each background process, and
> then set the dependencies as needed.
>
> Are you referring to a package in portage or a custom job?
>
Either case... One example, perhaps a stinky example (but I'll use it
anyway) is the vmware startup script.
IMHO, breaking some of these things up into multiple scripts is
overcomplicating it. Especially if things need to fire in a certain
order. It would be easier for me to just have one script to zap as
either started or stopped.... zapping started would allow me to simply
shut down any parts that happen to be running without hunting around for
PID's.
Although I can see where splitting it into several separate init scripts
would give more granular control, sure.
Cheers,
Dylan Carlson [absinthe@pobox.com]
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2003-01-21 21:20 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-18 17:52 [gentoo-dev] Starting/stopping services Andy Arbon
2003-01-18 18:09 ` Caleb Shay
2003-01-18 18:09 ` Burton Samograd
2003-01-18 18:11 ` will
2003-01-21 8:56 ` Matt Tucker
2003-01-21 9:09 ` Mike Frysinger
2003-01-21 15:39 ` Dylan Carlson
2003-01-21 20:15 ` J Robert Ray
2003-01-21 21:15 ` Dylan Carlson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox