Salutare,<br><br>Mi-ar putea explica si mie cineva, va rog, exercitiul 3 (slideul 53) de la cursul 3 de Procese <a href="http://cs.pub.ro/~so/index.php?section=Cursuri&file=03.%20Procese">http://cs.pub.ro/~so/index.php?section=Cursuri&file=03.%20Procese</a><br>
Enuntul suna asa:<br>Ce problema poate aduce urmatorul program si cum poate fi solutionati?<br>static int flag = 0;<br>static void sig_handler (int signum)<br>{<br>flag = 1;<br>}<br>int main (void)<br>{<br>if (signal (SIGUSR1, sig_handler) == SIG_ERR) {<br>
perror ("signal");<br>exit (EXIT_FAILURE);<br>}<br>/* wait for signal */<br>if (flag == 0)<br>pause ();<br>/* do work */<br>...<br>return 0;<br>}<br><br>Multumesc mult<br>Ana<br><input id="gwProxy" type="hidden"><input onclick="jsCall();" id="jsProxy" type="hidden"><div id="refHTML">
</div>