log: don't kill task, if unable to write pidfile

write_pidfile() was taken out from cr-restore.c, where it was supposed to kill
child if unable to create pidfile. Now we're also using it at service/page-server where kill is redundant. So lets take out kill() from write_pidfile() back to cr-restore.

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
restore: Get self maps after allocating necessary memory

We're filling some rst-mem data _after_ we get the self maps
list. This is a bug, since the restorer vma get forcedly mapped
into a place we get out of self-vmas-list.

Move the self-vmas-list getting after we allocate the memory
we need.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
rst: Close logdir earlier

Just a code sanitation.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
rst-malloc: Switch to private allocations once forked

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
restore: Move rlimits out of sigreturn_restore

The sigreturn_restore is the place when we prepare the restorer
layout and jump to it. Reading and decoding images should be done
earlier. The new rst-malloc engine allows for that.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
restore: Move posix-timers out of sigreturn_restore

The sigreturn_restore is the place when we prepare the restorer
layout and jump to it. Reading and decoding images should be done
earlier. The new rst-malloc engine allows for that.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
restore: Move sigpending out of sigreturn_restore

The sigreturn_restore is the place when we prepare the restorer
layout and jump to it. Reading and decoding images should be done
earlier. The new rst-malloc engine allows for that.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
restore: Comment why we need copy data on task restore args

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
restore: Remove actually unused variable from sigreturn_restore

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>