Skip to content

Commit 0617286

Browse files
committed
fast_page_fault_helper: return 1 instead of -1 in case of error
-1 wraps around to 255, which in case of commands executed over SSH clashes with SSH defined return codes. Signed-off-by: Patrick Roy <[email protected]>
1 parent 44b4c1b commit 0617286

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

resources/overlay/usr/local/bin/fast_page_fault_helper.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ int main(int argc, char *const argv[]) {
2525
sigemptyset(&set);
2626
if (sigaddset(&set, SIGUSR1) == -1) {
2727
perror("sigaddset");
28-
return -1;
28+
return 1;
2929
}
3030

3131
ptr = mmap(NULL, MEM_SIZE_MIB, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
3232

3333
if (MAP_FAILED == ptr) {
3434
perror("mmap");
35-
return -1;
35+
return 1;
3636
}
3737

3838
memset(ptr, 1, MEM_SIZE_MIB);

0 commit comments

Comments
 (0)