[so] Exercitiul 3 - cursul 3 Procese
ana-maria lepar
amylepar at gmail.com
Thu Sep 3 16:25:55 EEST 2009
Salutare,
Mi-ar putea explica si mie cineva, va rog, exercitiul 3 (slideul 53) de la
cursul 3 de Procese
http://cs.pub.ro/~so/index.php?section=Cursuri&file=03.%20Procese
Enuntul suna asa:
Ce problema poate aduce urmatorul program si cum poate fi solutionati?
static int flag = 0;
static void sig_handler (int signum)
{
flag = 1;
}
int main (void)
{
if (signal (SIGUSR1, sig_handler) == SIG_ERR) {
perror ("signal");
exit (EXIT_FAILURE);
}
/* wait for signal */
if (flag == 0)
pause ();
/* do work */
...
return 0;
}
Multumesc mult
Ana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/so/attachments/20090903/cd1cedd0/attachment.htm>
More information about the so
mailing list