├── 0SSP_Individual_Tsion-Melese-Zewdie_bdu1602642_B.pdf ├── README.md └── Implementation of sigaction().cpp /0SSP_Individual_Tsion-Melese-Zewdie_bdu1602642_B.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zion-tsi/OSSP_Tsion_Melese/HEAD/0SSP_Individual_Tsion-Melese-Zewdie_bdu1602642_B.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OSSP_Tsion_Melese 2 | Installation of operating system IOS 3 | 4 | This operating system is a mobile or ipad OS for apple hardwares. here are some descriptions about the OS and also steps for the installation procces. 5 | The general decriptions include its historical back ground , its requirements to be installed , its file support sysytems , its future outlooks and so on. 6 | 7 | Implementation of system call sigaction() 8 | 9 | sigaction() is one of the best system calles which is a signal handler in operating systems. used to change the action taken by 10 | a process on receipt of a specific signal. 11 | -------------------------------------------------------------------------------- /Implementation of sigaction().cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | void handler(int signum) { 8 | printf("Caught signal %d\n", signum); 9 | exit(0); 10 | } 11 | 12 | int main() { 13 | struct sigaction sa; 14 | memset(&sa, 0, sizeof(sa)); // Clear the struct 15 | sa.sa_handler = handler; // Set the handler 16 | sigaction(SIGINT, &sa, NULL); // Register the handler 17 | 18 | while (1) { 19 | printf("Running... Press Ctrl+C to stop.\n"); 20 | sleep(1); 21 | } 22 | return 0; 23 | } 24 | --------------------------------------------------------------------------------