From: Sukadev Bhattiprolu <[email protected]>
Date: Thu, 4 Mar 2010 22:36:31 -0800
Subject: [PATCH 06/12][user-cr] Add app_restart_args->uerrfd

Add a 'uerrfd' field in struct app_restart_args so other callers of
app_restart() can also choose a file descriptor for the error messages
from app_restart().

Signed-off-by: Sukadev Bhattiprolu <[email protected]>
---
 restart.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/restart.c b/restart.c
index ac0acf3..d4a4000 100644
--- a/restart.c
+++ b/restart.c
@@ -387,6 +387,7 @@ struct app_restart_args {
        int infd;
        int klogfd;
        int ulogfd;
+       int uerrfd;
        long warn;
        int debug;
        int verbose;
@@ -500,6 +501,7 @@ static void parse_args(struct app_restart_args *args, int 
argc, char *argv[])
        args->infd = -1;
        args->klogfd = -1;
        args->ulogfd = fileno(stdout);
+       args->uerrfd = fileno(stderr);
        args->warn = CKPT_COND_WARN;
        args->fail = CKPT_COND_FAIL;
        args->send_sigint = -1;
@@ -825,6 +827,7 @@ int app_restart(struct app_restart_args *args)
        global_debug = args->debug;
        global_verbose = args->verbose;
        global_ulogfd = args->ulogfd;
+       global_uerrfd = args->uerrfd;
 
        /* input file descriptor (default: stdin) */
        if (args->infd >= 0) {
-- 
1.6.0.4

_______________________________________________
Containers mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/containers

_______________________________________________
Devel mailing list
[email protected]
https://openvz.org/mailman/listinfo/devel

Reply via email to