Skip to content

Commit

Permalink
subproc: mark cloneFunc as [[noreturn]]
Browse files Browse the repository at this point in the history
  • Loading branch information
robertswiecki committed Aug 18, 2023
1 parent 611ef1c commit 2dc9cb5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions subproc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -525,9 +525,10 @@ static uint8_t cloneStack[128 * 1024] __attribute__((aligned(__BIGGEST_ALIGNMENT
/* Cannot be on the stack, as the child's stack pointer will change after clone() */
static __thread jmp_buf env;

static int cloneFunc(void* arg __attribute__((unused))) {

[[noreturn]] static int cloneFunc(void* arg __attribute__((unused))) {
longjmp(env, 1);
return 0;
LOG_F("Execution past longjmp");
}

/*
Expand Down

0 comments on commit 2dc9cb5

Please sign in to comment.