forked from mesonbuild/meson
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle freezing tests. Fixes mesonbuild#10752.
- Loading branch information
Showing
4 changed files
with
36 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include<stdio.h> | ||
#include <signal.h> | ||
#include <string.h> | ||
#include <stdlib.h> | ||
|
||
static void do_nothing(int signo, siginfo_t *info, void *context) { | ||
} | ||
|
||
int main(int argc, char **argv) { | ||
struct sigaction sa; | ||
memset(&sa, 0, sizeof(struct sigaction)); | ||
sa.sa_sigaction = do_nothing; | ||
if (sigaction(SIGTERM, &sa, NULL) == -1) { | ||
printf("Could not set up signal handler.\n"); | ||
return 1; | ||
} | ||
printf("Freezing forever.\n"); | ||
while(1) { | ||
} | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
project('freeze', 'c') | ||
|
||
e = executable('freeze', 'freeze.c') | ||
test('freeze', e, timeout: 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters