Blame src/daemon/ptyc_daemon_signal.c

87ae0a
/*********************************************************/
87ae0a
/*  ptycon: a pty-console bridge                         */
1f983d
/*  Copyright (C) 2016--2017  Z. Gilboa                  */
87ae0a
/*  Released under GPLv2 and GPLv3; see COPYING.PTYCON.  */
87ae0a
/*********************************************************/
87ae0a
87ae0a
#include <psxtypes/psxtypes.h>
87ae0a
#include <ntapi/ntapi.h>
87ae0a
#include <ntapi/nt_termios.h>
87ae0a
87ae0a
#include "ptycon_daemon_impl.h"
87ae0a
#include "ptycon_driver_impl.h"
87ae0a
87ae0a
int32_t __stdcall ptyc_daemon_signal(nt_tty_port_msg * msg)
87ae0a
{
87ae0a
	/* [not a] ctty signal? */
87ae0a
	if (msg->ctlinfo.ctxarg[0])
87ae0a
		return NT_STATUS_SUCCESS;
87ae0a
87ae0a
	/* ctty sigint */
87ae0a
	if (msg->ctlinfo.ctlcode == TTY_TCSBRK)
87ae0a
		ntapi->zw_terminate_process(
87ae0a
			NT_CURRENT_PROCESS_HANDLE,
87ae0a
			NT_STATUS_WAIT_1);
87ae0a
87ae0a
	return NT_STATUS_NOT_SUPPORTED;
87ae0a
}