From 25d81fe88c7e9aebe011b7b625b4eb7d31936591 Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 2 Apr 2020 20:51:30 +0200 Subject: Added timeout detection --- main.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index f4405e4..ca47745 100644 --- a/main.c +++ b/main.c @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/06 18:13:45 by cacharle #+# #+# */ -/* Updated: 2020/02/26 17:33:55 by cacharle ### ########.fr */ +/* Updated: 2020/04/02 20:46:17 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,11 +16,19 @@ int main(int argc, char **argv) { + timeout.tv_sec = 1; + timeout.tv_usec = 0; + if (pipe(timeout_pipe) == -1) + return (1); + (void)argc; (void)argv; + + timeout.tv_sec = 0; + timeout.tv_usec = 100000; test_pft_nacked(); test_pft_percent(); - /* test_pft_nocrash(); */ + test_pft_nocrash(); test_pft_string(); test_pft_int_i(); test_pft_int_d(); -- cgit