2 ms·
My understanding is that zsh registers a signal handler for SIGWINCH and that handler fixes things up. --- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL}
by kccqzy 6y ago
My understanding is that zsh registers a signal handler for SIGWINCH and that handler fixes things up.
--- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [WINCH], 8) = 0
rt_sigprocmask(SIG_SETMASK, [WINCH], ~[KILL STOP RTMIN RT_1], 8) = 0
ioctl(10, TIOCGWINSZ, {ws_row=45, ws_col=108, ws_xpixel=756, ws_ypixel=585}) = 0
getuid() = 1000
geteuid() = 1000
capget({version=_LINUX_CAPABILITY_VERSION_3, pid=0}, NULL) = 0
capget({version=_LINUX_CAPABILITY_VERSION_3, pid=0}, {effective=0, permitted=0, inheritable=0}) = 0
ioctl(10, TIOCSPGRP, [20139]) = 0
ioctl(10, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
ioctl(10, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig -icanon -echo ...}) = 0
ioctl(10, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
write(10, "\r\r\33[0m\33[27m\33[24m\33[J\33[44mubuntu@i"..., 90) = 90
rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system call)
It essentially queries the new window size, and then writes a new prompt beginning with two carriage returns.