Demo entry 6775413

1

   

Submitted by anonymous on Nov 24, 2018 at 22:53
Language: C. Code size: 409 Bytes.

#include <stdio.h>
#include <unistd.h>
#include <signal.h>

int main(void){
	sigset_t sigset;
	int n;

	sigemptyset(&sigset);
	sigaddset(&sigset,SIGINT);
	sigprocmask(SIG_BLOCK, &sigset, NULL);
	printf("Ctrl-c¿¡ ´ëÇØ ºí·Ï ó¸® ÇÕ´Ï´Ù.\n");
	for(n=0; n<5; n++){
		printf("Hanbit Books\n");
		sleep(1);
	}
	printf("Ctrl-c¿¡ ´ëÇÑ ºí·ÏÀ» ÇØÁ¦ ÇÕ´Ï´Ù.\n");
	sigprocmask(SIG_UNBLOCK, &sigset, NULL);
	
	return 0;
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).