Implement SIGWINCH.
This commit is contained in:
parent
ecd5217da8
commit
bf1d15957e
|
@ -656,6 +656,7 @@ int PTY::master_ioctl(ioctx_t* ctx, int cmd, uintptr_t arg)
|
||||||
const struct winsize* user_ws = (const struct winsize*) arg;
|
const struct winsize* user_ws = (const struct winsize*) arg;
|
||||||
if ( !ctx->copy_from_src(&ws, user_ws, sizeof(ws)) )
|
if ( !ctx->copy_from_src(&ws, user_ws, sizeof(ws)) )
|
||||||
return -1;
|
return -1;
|
||||||
|
winch();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return ioctl(ctx, cmd, arg);
|
return ioctl(ctx, cmd, arg);
|
||||||
|
|
|
@ -324,6 +324,17 @@ void TTY::hup()
|
||||||
poll_channel.Signal(POLLHUP);
|
poll_channel.Signal(POLLHUP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TTY::winch() // termlock taken
|
||||||
|
{
|
||||||
|
ScopedLock family_lock(&process_family_lock);
|
||||||
|
if ( 0 < foreground_pgid )
|
||||||
|
{
|
||||||
|
Process* process = CurrentProcess()->GetPTable()->Get(foreground_pgid);
|
||||||
|
if ( process )
|
||||||
|
process->DeliverGroupSignal(SIGWINCH);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void TTY::ProcessUnicode(uint32_t unicode)
|
void TTY::ProcessUnicode(uint32_t unicode)
|
||||||
{
|
{
|
||||||
mbstate_t ps;
|
mbstate_t ps;
|
||||||
|
|
|
@ -78,6 +78,7 @@ public:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void hup();
|
void hup();
|
||||||
|
void winch();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void tty_output(const char* str)
|
void tty_output(const char* str)
|
||||||
|
|
Loading…
Reference in New Issue