Open nephros opened 1 year ago
I suppose step 3 is a really rare case (borderline to artificial), but AFAIU your considerations are fully correct.
Additionally step 4 "the user ignores the strong suggestion to restart the patched service / program" is required for ultimately that service / program not working correctly … until the next reboot. Which lets the whole issue appear to be a rare corner case.
Hence one valid approach is IMO not to address this technically, but to emphasise that things my not work correctly if the suggestion to restart the service / program is not obeyed.
DESCRIPTION
Consider:
patch foo version 1.0
which affectsfile1
,file2
, andfile3
.X
is launched, opening the three files, getting redirected as usual by the preload library.patch foo version 1.1
which affectsfile1
,file2
, but no longerfile3
.The process
X
may now have a version offile3
in use that shouldn't exist any more. E.g. a QML program mightQt.resolvedUrl("file3")
. This will work after 2., but fail after 3.Also it may have been initialized with the state of things in the files from after 1., but reading the same files after 3. will serve new content.
It's easy (?) to see that this can confuse processes.
ADDITIONAL INFORMATION
The PM daemon has a state where it "recommends" affected processes ("services") to be restarted.
Communication between the preload library and the daemon should include that information, and the preload library should log a warning if it discovers that it's redirecting to files which have been "patched twice".