コード例 #1
0
ファイル: IODeviceManager.cpp プロジェクト: Rossf91/Honours
 IODeviceManager::~IODeviceManager()
 {
   if (started) {
     stop_devices();
   }
   destroy_devices();
 }                                                        
コード例 #2
0
ファイル: launch.c プロジェクト: michaelforney/swc
static void
deactivate(void)
{
	struct swc_launch_event event = {.type = SWC_LAUNCH_EVENT_DEACTIVATE};

	send(sock[0], &event, sizeof(event), 0);
	stop_devices(true);
	active = false;
}
コード例 #3
0
ファイル: launch.c プロジェクト: michaelforney/swc
static void
cleanup(void)
{
	struct vt_mode mode = {.mode = VT_AUTO};

	if (!original_vt_state.altered)
		return;

	/* Cleanup VT */
	ioctl(tty_fd, VT_SETMODE, &mode);
	ioctl(tty_fd, KDSETMODE, original_vt_state.console_mode);
	ioctl(tty_fd, KDSKBMODE, original_vt_state.kb_mode);

	/* Stop devices before switching the VT to make sure we have released the DRM
	 * device before the next session tries to claim it. */
	stop_devices(false);
	ioctl(tty_fd, VT_ACTIVATE, original_vt_state.vt);

	kill(0, SIGTERM);
}