Comment 3 for bug 402398

Revision history for this message
clever (clever-nbnet) wrote :

read(0, "\n", 128) = 1
access("/usr/bin/irssi", X_OK) = 0
getuid32() = 1000
stat64("/usr/bin/irssi", {st_mode=S_IFREG|0755, st_size=773068, ...}) = 0
open("/home/clever/.irssi/session", O_RDONLY|O_CREAT|O_LARGEFILE, 0600) = 3
close(3) = 0
unlink("/home/clever/.irssi/session") = 0
open("/home/clever/.irssi/session", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0600) = 3
write(3, "servers", 7) = 7
....
close(3) = 0
write(1, "\33[?25l\33[48;12H\33[K\33[34h\33[?25h", 28) = 28
rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0
munmap(0xb7952000, 135168) = 0
rt_sigaction(SIGCONT, {SIG_DFL}, {0x8067320, [], 0}, 8) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
ioctl(0, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
write(1, "\33[m\33[24m\33[23m\33[m\33[24m\33[23m\33[48;1"..., 41) = 41
execve("/usr/bin/irssi", ["/usr/bin/irssi", "--noconnect", "--session=/home/clever/.irssi/se"..., "--home=/home/clever/.irssi", "--config=/hom
e/clever/.irssi/con"...], [/* 35 vars */]) = 0
this short clip from stracing irssi while it upgrades
the read of \n is when i hit enter after giving it the upgrade command it then checks on the new binary and dumps all state data to a session file and runs the new version using execve passing it a few special args to disable autoconnecting and to load the old state from the file
the fd number for all open sockets/files doesnt change so it can just dump what # each socket it as and basic state and then once the other version init's it can just read the sockets and keep working
ctrlproxy would probly need a list of clients and servers in the state file and basic info such as which server/network/fd each connection is and what network/fd each client is at
current nick/channels and other stuff might be optional since most can be queryed from the ircd