On Sat, Feb 08, 2003 at 10:44:28PM +0100, Ronald Bultje wrote:
> Hi Brian,

Hi Ronald,

> On Fri, 2003-02-07 at 14:17, [EMAIL PROTECTED] wrote:
> > Should be.  But it might lag while it waits for disk i/o or something.
> 
> Could be... But this never happens in practice actually.

Something happens.  Every now and then (before I commented the kill()
out entirely), I got a "Killed" in my shell script (that starts glav)
and the part of the script after the glav was not executed, so
something was lagging.

> Anyway, I see
> your point and it's valid.

That's good.

> The idea is that there is no issue in lavplay that triggers this.

But if glav goes on doing the kill -9 silently, if and when a problem
does come up in lavplay that this kill() actually deals with (hacks
around IMHO), nobody (using glav) will know about it.

> > c. alternatively change the first argument of kill() to -1 or
> 
> Erm...

Bah!  Wrong one.  I meant change the first argument of kill() to -n
where n is the pgrp id.  Messy.

> I personally would love to try this out, but I don't think end users
> will appreciate it.

Ohhhh.  Bit of a BOFH too huh?  :-)

> I'm all in for changing the first argument to pid.

OK.  I can live with that.

> Changing to SIGINT
> isn't actually that much of a good idea, since lavplay grabs SIGINT to
> close down.

Right.  That is the point of using SIGINT.  To let lavplay know that
things are going down and give it it's chance to clean up.

> SDL actually does the same thing which even complicates
> things more. If something went wrong (and that's what happens if this
> one is called), you don't actually want the application to grab the
> signal and exit gracefully because that's probably the whole reason why
> this function was called in the first place - it will just hang.

That is what would need to be fixed if this were the case then.

> It
> should die. So I'd suggest maintaining SIGTERM, but using kill(pid, 9)
> instead of kill(0, 9).

9 is (usually and in context of glav/lavplay) SIGKILL (and in fact the
macro SIGKILL should be used in glav rather than the digit 9 for
portability).  SIGTERM is (usually) 15.

> Patch committed to CVS.

Excellent!  Thanx.  At least any shells/scripts that call glav won't
get mysteriously slaughtered now.  :-)

b.

-- 
Brian J. Murrell

Attachment: msg00670/pgp00000.pgp
Description: PGP signature

Reply via email to