Hicks, Matthew wrote:
>>Daemonizing is something you do with your program *before* you start
>>POE.  
> 
> 
> I daemonize before creating any sessions or calling kernel->run().
> 
> 
>>I do daemonizing all the time.  start program, daemonize, start poe.
>>use wheel::run all you want.
> 
> 
> Super!  Do you have sample code for a daemon that uses the system's
> "tail" command to tail files with POE::Wheel::Run?  Please post it.

No.  I use Wheel::FollowTail. :)

>>Why or how is this breaking for you?
> 
> 
> The behavior I see (in my Solaris 8 & 9 environment) is that if STDIN
> reopened from /dev/null (which the daemonizing modules do) then a
> POE::Wheel::Run spawning a tail command returns error 0 immediately.  If
> STDIN is left alone during daemonization, POE::Wheel::Run spawning a
> tail command works just fine.

But... this doesn't make sense.  POE::Wheel::Run sets up NEW pipes (or
sockets) between itself and the master program.  The programs it runs
gets their own copies of the various STD* handles, which are piped back
into that particular instance of the forked (or whatever) process, in a
way that really should have no relationship to the MAIN program's IO at
all.  IIRC.

> I don't know if this is a POE problem.  I doubt it is.  But, since I
> encountered this strange behavoir while *trying to implement a
> suggestion in the POD* I thought it was worthy of posting what I found
> here. 
> 
> Sorry my previous post wasn't clear enough.

It wasn't about that.  It was reading you say: I'm trying to do
something that you've already done.  I'm following the docs.  It's not
working... and the part that's not working is that my catalytic
converter isn't connecting to the spark plugs right.

Honestly, from here it looks like you're either doing it wrong, or there
is an issue I'm quite ignorant of (VERY possible :).  But if all you're
trying to process is tail(1), then use POE::Wheel::FollowTail and
hopefully you'll sidestep the problem.

Good luck!

L8r,
Rob

Reply via email to