- 12 Apr, 2012 1 commit
-
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 11 Apr, 2012 10 commits
-
-
Pavel Emelyanov authored
If I'm not mistaken this covers all the if-s in the restore_pgid and restore_sid code. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This is preriquisity for terminals handling and just a good practice to save and restore everything we can :) Not all combinations are supported. All the problems we still have come from the inability to attach to group/session with ID no tasks own as its PID. This can be workarounded by fork()-ing this pid temporarily, but we'd rather think in the direction of modifying the kernel to give us direct syscall for this (oh my...) Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
I store them on _entry since sids can only be inherited or set to current's pid. Thus the best we can do it restore sids at fork time, thus save them in the image we use to fork. Maybe when we submit patches that will give us ability to set arbitrary pgid and sid we'll change this, but this is in the future. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
They are just two next in this file, so extend. This is required for pgid/sid early read, see next patches for details. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This is trivial change, but is required to check for pgid/sid are in 'restorable' state, see for respective patch/code for details. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
New stage CR_STATE_FORKING. This is required to restore pgids properly -- we need to make sure a task with pid whose pgid we are about to enter is alive. And this task is not necesserily our parent, thus wait for everyone to appear. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Otherwise multiple writers can screw each-other's messages. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Wile the task is infected we cannot just detach from it and go away. The victim will die after this. So, call the parasite_cure_seized on any error handing between infect and cure. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This is not very good practice :) Just leave them in the state they've been to before dumping. Plz note, that tasks segfault for some reason after unseizeing, but this is another story. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
For regfiles this is done at open() time, for pipes thit is done with fcntl. Use the same fcntl approach for sockets. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 10 Apr, 2012 14 commits
-
-
Cyrill Gorcunov authored
It doesn't make sense to try to connect sockets if error happened previously. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
It's confusing to see the output like | Got fd for 3 | Got fd for 3 Better to point what is going on | Got fd for 3 (state -> 0) | Got fd for 3 (state -> 1) Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
No need to obtain MAGIC_OFFSET from current position, the files have predefined structure. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This bit is not per-file, but per-fd, thus put it on the fdinfo_entry. Draing these bits from parasite together with the fds themselves, save into image and restore with fcntl F_SETFD cmd where applicable. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The flags are only one bit in the kernel (close-on-exec, all the rest are not per-fd, but per-file), but for simplicity I save it in a char field. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This is required for proper close-on-exec handling (coming soon) and for fowners (coming soon as well) and for file flags (yes, yes). Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
It used to be ulong, but it can be int now (no mapping addresses there). And the name fd is better than fd_name (reason is the same). Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 09 Apr, 2012 15 commits
-
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
reopen_fd_as closes old descriptor. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Just dump their IDs and check they are not shared. For future. IO and SEMUNDO is not there since tasks may have NO such objects and currently we cannot detect whether they have them equal or both don't have. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Just move the patched code from file-ids.c to kcmp-ids.c and make the former one be client for the latter. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
2nd step in making kid tree generic. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
kid_ stands for kernel id and this is preparation for making the fd_id_ tree generic enough to support any type of kcmp- calls. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Now we store only real fdtable entries in this file, so it's time to name the field properly and change type to u32. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
It's no longer required. All the previously special fds are now scattered over other images. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-