Why is the League client split between the patcher and the actual client?

My Anime Waifu·4/9/2015, 7:36:34 PM·2 votes·619 views

It's a bit odd, as putting it on the taskbar takes up 2 slots instead of 1.

2 Comments

Ayame Isaki4/9/2015, 8:02:35 PM2 votes

It has been a really long time (multiple years) since I've written software for Windows (I hate Windows development), but the last time I did it I needed to do something similar for a service to auto-update itself with new code. The reason for this has to do with the fact you cannot modify a file that is in use in Windows (i.e. you cannot move, delete, rename, or alter said file). As such, if the client was running and trying to update itself, it would fail as the .exe that needed to be updated was in use by the thing trying to update it. By having the client spawn an update process and exit, it can safely update the client as the .exe is not locked by the operating system.

EDIT: On Unix/Linux, you can overwrite the binary for a running process. However, if you do so you run the risk of hitting a SIGBUS or other strange error condition if part of that binary needs to be referenced and hasn't been loaded into (or was swapped out of) RAM. Since OS X is based on BSD (Unix) I am going to assume it works the same; if I have time I might test this out for fun.