As a simple flag, a file may work but I'm not crazy about that one. If someone else touches it they affect the process ... Files, in general, make poor IPC choices. For a simple flag, pick a semaphore model. Depends on your platform which one fits -- I'm only familiar with the UNIX System V semapahores but have not used them from Perl. A signal can be used as a semaphore, but that also keeps me awake at night. It's asynchronous which means that anything called from the handler has to be reentrant. You can sometimes get away with setting a global flag and checking it in your main loop in a pinch though. Again, I have not done any of that in Perl so just ideas ...
In reply to Re: Re: Child reading from Parent
by steves
in thread Child reading from Parent
by icius
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |