vlastni osetreni signalu SIGINT

Libor Chocholaty libor_ml1 na mts.cz
Pátek Říjen 21 16:22:41 CEST 2005


Jan Markus wrote:

>#include <stdio.h>
>#include <signal.h>
>
>void clean_exit(int i) { 
>  printf("heeeelp! murdeeeer! \n");
>  return EOF;
>  fflush(stdout);
>  _exit(0);
>  /* a tak podobne */
>}
>
>int main(void) {
>  [...]
>  signal(SIGINT, clean_exit);
>}
>  
>
Zkuste to prehodit, nejdriv nastavit signal handler a teprve potom 
delat, co je potreba.
Libor





Další informace o konferenci Linux