1. 10 Dec, 2014 3 commits
    • Saied Kazemi's avatar
      Add inherit fd support · 0412152f
      Saied Kazemi authored
      There are cases where a process's file descriptor cannot be restored
      from the checkpoint images.  For example, a pipe file descriptor with
      one end in the checkpointed process and the other end in a separate
      process (that was not part of the checkpointed process tree) cannot be
      restored because after checkpoint the pipe will be broken.
      
      There are also cases where the user wants to use a new file during
      restore instead of the original file at checkpoint time.  For example,
      the user wants to change the log file of a process from /path/to/oldlog
      to /path/to/newlog.
      
      In these cases, criu's caller should set up a new file descriptor to be
      inherited by the restored process and specify the file descriptor with the
      --inherit-fd command line option.  The argument of --inherit-fd has the
      format fd[%d]:%s, where %d tells criu which of its own file descriptors
      to use for restoring the file identified by %s.
      
      As a debugging aid, if the argument has the format debug[%d]:%s, it tells
      criu to write out the string after colon to the file descriptor %d.  This
      can be used, for example, as an easy way to leave a "restore marker"
      in the output stream of the process.
      
      It's important to note that inherit fd support breaks applications
      that depend on the state of the file descriptor being inherited.  So,
      consider inherit fd only for specific use cases that you know for sure
      won't break the application.
      
      For examples please visit http://criu.org/Category:HOWTO.
      
      v2: Added a check in send_fd_to_self() to avoid closing an inherit fd.
          Also, as an extra measure of caution, added checks in the inherit fd
          look up functions to make sure that the inherit fd hasn't been reused.
          The patch also includes minor cosmetic changes.
      Signed-off-by: 's avatarSaied Kazemi <saied@google.com>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      0412152f
    • Oleg Nesterov's avatar
    • Oleg Nesterov's avatar
      criu: check: don't leak the child if PTRACE_ATTACH fails · 40ae0fa3
      Oleg Nesterov authored
      PS: never ever use PTRACE_KILL.
      Signed-off-by: 's avatarOleg Nesterov <oleg@redhat.com>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      40ae0fa3
  2. 08 Dec, 2014 7 commits
  3. 01 Dec, 2014 4 commits
  4. 29 Nov, 2014 3 commits
  5. 26 Nov, 2014 2 commits
  6. 19 Nov, 2014 3 commits
  7. 14 Nov, 2014 1 commit
  8. 13 Nov, 2014 1 commit
  9. 12 Nov, 2014 13 commits
  10. 11 Nov, 2014 3 commits