On Sun, Jun 03, 2012 at 12:41:31AM -0700, Philip Guenther wrote:
> On Sat, Jun 2, 2012 at 11:38 PM, Robert Connolly
> <robertconnolly1...@gmail.com> wrote:
> > I am running apmd without arguments from rc.conf. I am also running lid
> > close suspend from sysctl.conf. When I close the lid, and open it again,
> > apmd is gone from 'ps auxw'.
> 
> ktrace?
> run it under gdb (passing it the -d option to not go into the
> background) and see what signal kills it and where?


I'm pretty sure I ran into this same issue a while ago.  I tried to use
/etc/apm/{powerup,powerdown} to switch between 'apm -C' and 'apm -A'
when undocking/docking my laptop.  apmd didn't like being poked by apm
from those files.  Just use apm in one of the related /etc/apm files to
reproduce.

  [danh@t obj] $ cat /etc/apm/resume
  apm -A

  [danh@t obj] $ sudo gdb apmd
  (gdb) set args '-d'
  (gdb) run
  Starting program: /usr/obj/usr.sbin/apmd/apmd '-d'
  [New process 12159]

[... enter suspend, then resume here ...]

  Terminated 

  Program received signal SIGPIPE, Broken pipe.
  0x000000020a543c6a in sendto () from /usr/lib/libc.so.64.1
  (gdb) bt
  #0  0x000000020a543c6a in sendto () from /usr/lib/libc.so.64.1
  #1  0x00000000004020e9 in handle_client (sock_fd=Variable "sock_fd" is not 
available.
  ) at /usr/src/usr.sbin/apmd/apmd.c:469
  #2  0x00000000004027cd in main (argc=Variable "argc" is not available.
  ) at /usr/src/usr.sbin/apmd/apmd.c:728

Reply via email to