in reply to Re: Signaling in threads
in thread Signaling in forked threads

CODE 1
#!/usr/bin/perl print "Hello Monks";

running the above code and grepping the process results in one process

CODE 2

#!/usr/bin/perl use forks; print "Hello Monks";

running the above code and grepping the process results in two process.

You all are right, it is actually different process not threads. Now in the code 2, smaller process id is of main program and other process id is one when i write "use fork". Now i want to register a handle for 'SIGUSR2' for the process created by "use forks;"

Replies are listed 'Best First'.
Re^3: Signaling in threads
by BrowserUk (Patriarch) on Apr 07, 2010 at 11:37 UTC

    Sorry, I cannot help you. The forks module does not run on my system.

    My point was that by mentioning "threads" in the title of your question, you are attracting the wrong people to read it.

    If you need help with the forks module, you should mention that module in your title. And not use the term "threading" when you are forking.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.