Initial commit

This commit is contained in:
Dawid Pietrykowski 2022-11-20 08:44:56 +01:00
commit f1abb7ec54
4 changed files with 29 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
**/build

11
10-23/CMakeLists.txt Normal file
View File

@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 3.0.0)
project(10-23 VERSION 0.1.0)
include(CTest)
enable_testing()
add_executable(10-23 main.c)
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)

BIN
10-23/main Executable file

Binary file not shown.

17
10-23/main.c Normal file
View File

@ -0,0 +1,17 @@
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include <stdlib.h>
void al(int i){
if(i == SIGALRM){
printf("alarm\n");
signal(SIGALRM, al);
}
}
int main(){
signal(SIGALRM, al);
pause();
return 0;
}