Re: daemon without pcntl_fork

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/8/19 Per Jessen <per@xxxxxxxxxxxx>:
> Jim Lucas wrote:

[snip]

> I probably wouldn't have chosen PHP for the first one, but there's no
> reason it shouldn't work.  For the second one, did you mean to
> write "serial port"?  That's a bit of a different animal, I'm not sure
> how far you'll get with php.
>
>> Here is what I have come up with so far.  Looks to satisfying my
>> needs:
>>
>> tms_daemon
> [snip]
>> # END OF SCRIPT
>
> Looks good to me. It'll certainly do the job.
>
>
> /Per

I agree with Per on all points--I probably wouldn't choose PHP as a
first choice for the first task, but the startup script you have shown
looks like a bog-standard startup script and should serve you well. I
haven't really gone over it with a fine-toothed comb though. Typos
etc. are still up to to you. :) Of course, the whole thing depends on
how tms_daemon behaves, but the startup script looks OK.

Can you explain in a bit more detail exactly what the second part (the
serial-network data logger) needs to do? I've written similar daemons
in C but not PHP--when I've needed to get something like that going
with a PHP script, I've used ser2net (which I linked to in an earlier
post) and been quite happy. Maybe you don't even have to do the hard
work yourself (or buy extra hardware to do it for you).


Cheers,

Torben

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux