Using mplayer with seme desktop symbols for streaming stations and wlan :-)

Chris Samuel chris at csamuel.org
Sun Jan 4 01:18:37 CET 2009


On Sun, 4 Jan 2009 10:41:27 am Robin Paulson wrote:

> one of the SIG signals might be better - have a look at SIGTERM and
> SIGHUP and some of their brethren; i can't remember which is best
> here.

Use the source, Luke.. ;-)

chris at quad:/tmp/mplayer/mplayer-1.0~rc2$ grep exit_sighandler mplayer.c
static void exit_sighandler(int x){
  signal(SIGTERM,exit_sighandler); // kill
  signal(SIGHUP,exit_sighandler);  // kill -HUP  /  xterm closed
  signal(SIGINT,exit_sighandler);  // Interrupt from keyboard
  signal(SIGQUIT,exit_sighandler); // Quit from keyboard
  signal(SIGPIPE,exit_sighandler); // Some window managers cause this
  signal(SIGBUS,exit_sighandler);  // bus error
  signal(SIGSEGV,exit_sighandler); // segfault
  signal(SIGILL,exit_sighandler);  // illegal instruction
  signal(SIGFPE,exit_sighandler);  // floating point exc.
  signal(SIGABRT,exit_sighandler); // abort()
    signal(SIGTRAP,exit_sighandler);


Looking at the handler:

  switch(x){
  case SIGINT:
  case SIGQUIT:
  case SIGTERM:
  case SIGKILL:
      break;  // killed from keyboard (^C) or killed [-9]

So there you go.  Quite how they expect to be able to handle SIGKILL given you 
can't catch it (or ignore it) I don't know.. ;-)

cheers,
Chris
-- 
 Chris Samuel  :  http://www.csamuel.org/  :  Melbourne, VIC

This email may come with a PGP signature as a file. Do not panic.
For more info see: http://en.wikipedia.org/wiki/OpenPGP

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: This is a digitally signed message part.
Url : http://lists.openmoko.org/pipermail/community/attachments/20090104/1b1dc5bb/attachment.pgp 


More information about the community mailing list