Changes

Jump to navigation Jump to search
61 bytes added ,  16:38, 23 July 2020
m
Grammar fix.
Line 1: Line 1: −
The current way of restoring from images is quite straightforward -- we just fork the necessary amount of tasks, then each of them starts "dressing" itself based on the data from image files. Sometimes shared resources appear, e.g. files inherited or sessions inherited on fork, or CLONE_XXX objects. With these we write code, that handles only this type of resources -- files a sent to co-owners via unix sockets, CLONE_XXX stuff is pre-created on fork stage. Sometimes more interesting dependencies arise, for example -- [[invisible files]]. These are also special-cared.
+
The current way of restoring from images is quite straightforward -- we just fork the necessary amount of tasks, then each of them starts "dressing" itself based on the data from image files. Sometimes shared resources appear, e.g. files inherited or sessions inherited on fork, or CLONE_XXX objects. With these we write code, that handles only this type of resources -- files are sent to co-owners via unix sockets, CLONE_XXX stuff is pre-created on fork stage. Sometimes more interesting dependencies arise, for example -- [[invisible files]]. These are also special-cared.
    
All this is not nice. We believe, that the restoring process can (and should) look better. Like this.
 
All this is not nice. We believe, that the restoring process can (and should) look better. Like this.
Line 36: Line 36:  
FORK:      {T(..)(.*)}                  -> {T\1N\2}|{N\1}    // T forks N
 
FORK:      {T(..)(.*)}                  -> {T\1N\2}|{N\1}    // T forks N
 
EXIT:      {I(..)(.*)}(.*){X(..)(.*)}  -> {I\1\2\5}\3        // X exits and all its kids are reparented to I (init)
 
EXIT:      {I(..)(.*)}(.*){X(..)(.*)}  -> {I\1\2\5}\3        // X exits and all its kids are reparented to I (init)
SETSID:    {S(.)(.*)}                   -> {SS\1}             // S becomes a new session leader
+
SETSID:    {S(.)(.)(.*)}               -> {S\1S\3}           // S becomes a new session leader
SETPGID(0): {P(.)(.)(.*)}                -> {P\1P\3}          // P becomes a new group leader
+
SETPGID(0): {P(.)(.)(.*)}                -> {PP\2\3}          // P becomes a new group leader
SETPGID(G): {G(.)G(.*)}(.*){P(.)(.)(.*)} -> {G\1G\2}\3{P\4G\6} // P joins session of alive G
+
SETPGID(G): {GGS(.*)}(.*){P(.)S(.*)}    -> {GGS\1}\2{PGS\4}
 +
            {P(.)S(.*)}(.*){GGS(.*)}     -> {PGS\2}\3{GGS\4}   // P joins group of alive G
 
</pre>
 
</pre>
    
[[Category: Plans]]
 
[[Category: Plans]]
 
[[Category: Thinkers]]
 
[[Category: Thinkers]]
2

edits

Navigation menu