3 ms·
OTP has some structures to help with upgrading that we didn't use. Mostly, you have to keep upgrading in mind when you make changes. Easy ones are things like i
by toast0 5y ago
OTP has some structures to help with upgrading that we didn't use. Mostly, you have to keep upgrading in mind when you make changes. Easy ones are things like if you add another field into a record (like a struct) that you're using for process state, you need to still handle the old version of the record, since it will be loaded into processes with old state. This is similar to what you need to do with APIs (local library or remote calls to other computers), but it's a little unusual to consider it in a running process.
For cp/install; cp will generally write over the existing file, but install unlinks and then writes a new file. If you've mmaped the file, you get changes in your process from cp (copy on write doesn't apply to mmap), but not with install (the old file is kept around until it's no longer referenced).