• Andrei Vagin's avatar
    crtools: close a signal descriptor after passing a preparation stage · ac5cac18
    Andrei Vagin authored
    This patch adds the --siganl-fd FD option to specify a file descriptor.
    CRIU will write '\0' to this descriptor and close it after passing
    a preparation stage.
    
    It is alternative way to demonizing a criu process after a preparation
    stage. It's imposiable to get exit code, if a process has daemonized.
    
    The introduced way allows to wait a preparation stage and to get an exit
    code. It can be easy used from shell and other script languages.
    
    v3: fix a help message
    
    v4: Here is a sequence of actions how it can be used:
         * open a pipe
         * run a service with the pipe[1] as status_fd
         * read(pipe[0]) to wait a moment when the service will be ready to
           accept connections
         * do a work which requires the service
         * wait the service process to gets its exit status to be sure that
           everything okey
    
    travis-ci: success for crtools: close a signal descriptor after passing a preparation stage (rev6)
    Cc: Mike Rapoport <mike.rapoport@gmail.com>
    Cc: Kir Kolyshkin <kir@openvz.org>
    Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
    ac5cac18
Name
Last commit
Last update
Documentation Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
include/common Loading commit data...
lib Loading commit data...
scripts Loading commit data...
soccr Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
INSTALL.md Loading commit data...
Makefile Loading commit data...
Makefile.config Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...