[CRIU] [PATCH] page-server: Add return check
Pavel Tikhomirov
snorcht at gmail.com
Tue May 21 05:13:04 EDT 2013
On ubuntu this don't compile if no check.
Signed-off-by: Pavel Tikhomirov <snorcht at gmail.com>
---
page-xfer.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/page-xfer.c b/page-xfer.c
index 93b5815..4efa20c 100644
--- a/page-xfer.c
+++ b/page-xfer.c
@@ -224,7 +224,10 @@ int cr_page_server(bool daemon_mode)
}
if (daemon_mode)
- daemon(0, 0);
+ if(daemon(0, 0) == -1){
+ pr_perror("Can't run in the background");
+ return -errno;
+ }
ask = accept(sk, (struct sockaddr *)&caddr, &clen);
if (ask < 0)
--
1.7.9.5
More information about the CRIU
mailing list