[haiku-3rdparty-dev] Re: How does a driver detect shut-downs

  • From: Barrett <b.vitruvio@xxxxxxxxx>
  • To: haiku-3rdparty-dev@xxxxxxxxxxxxx
  • Date: Thu, 31 Jul 2014 12:41:50 +0200

>
> Is there another way to handle this event?
>>
>
> A userland BApplication gets a B_QUIT_REQUESTED message with a boolean
> "_shutdown_" field. So you could use a helper background application that
> notifies the driver via ioctl(). That doesn't work for "shutdown -q",
> though.
>

You could add a call to a appositely done executable
in /boot/home/config/boot/UserShutdownScript to notify the shutdown, which
should work in all situations.

Other related posts: