At first glance I think you are using the wrong tools. I think that your task would be done much more simply using threads, but as you have only described the problems you are having with various attempts to achieve your goals with POE, rather than what your actual goals are, it is difficult to judge.
You said:
I want to follow the target process' output. It is extremely important that multiple users cann follow the output. Hence, I need to create an output stream (file stdout.txt)
but it is not clear to me what you mean by: "multiple users cann follow the output"? Do you mean 'follow' as in tail -f?
You want the script to launch a process and you want the script to be able to receive that output, but you also want the other "people", to be able to monitor that output.
How?
Using concurrent copies of your script?
By somehow attaching to 'the one copy' of your script and your script "broadcasting" the output to all listeners that attached?
By having the program write it's output directly (or via indirection) to a file and your script 'tail-ing' that file after it has launched the process--so that other people can also monitor it using tail -f or whatever they choose?
Have your script launch the process and capture it's output and then, as well as doing whatever it needs to with it, also write it to a file so that other peope can monitor that file using tail or whatever?
Each of these approaches is possible, but which is appropriate depends entirely upon what your requirements are.
And I think any of them would be much simpler done using threads than POE--under win32 at least.
Examine what is said, not who speaks.
Silence betokens consent.
Love the truth but pardon error.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.