[CRIU] [PATCH] restore: don't forget to set nr = 0, if no signal image is found(backward compatibility)

Ruslan Kuprieiev kupruser at gmail.com
Mon Aug 25 02:37:49 PDT 2014


We have this bug since support for signals was added.

Signed-off-by: Ruslan Kuprieiev <kupruser at gmail.com>
---
 cr-restore.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/cr-restore.c b/cr-restore.c
index 0349e3e..7ba39ae 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -2392,9 +2392,10 @@ static int open_signal_image(int type, pid_t pid, unsigned int *nr)
 
 	fd = open_image(type, O_RSTR | O_OPT, pid);
 	if (fd < 0) {
-		if (fd == -ENOENT) /* backward compatibility */
+		if (fd == -ENOENT) {/* backward compatibility */
+			*nr = 0;
 			return 0;
-		else
+		} else
 			return -1;
 	}
 
-- 
1.9.1



More information about the CRIU mailing list