What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » PHP Signal handling

PHP Signal handling
Author: Message:
MeEtc
Patchou's look-alike
*****

Avatar
In the Shadow Gallery once again

Posts: 2200
Reputation: 60
38 / Male / Flag
Joined: Nov 2004
Status: Away
O.P. PHP Signal handling
I'm experimenting with a PHP-based MSN bot. It runs a background CLI process that pretty much loops forever until it received a TERM signal from a bash script. Right now, the only way of inserting data into the process is for sending of messages. To do that, a file is created in a specific format and CHMODed to 666. The script picks it up on the loop cycle, processes and sends message, then moves file to a backup directory.

What I'm interested in, is if its possible to send raw data to such a running process and be able to process it (and send some back if possible too).

I'm looking at the pcntl_signal() function that registers a callback for when a specific signal is sent to the process (like TERM, which is already in the code), but I have no idea on how to send such a signal either from another PHP script. This function still doesn't take data, but I could at least tell it to go looking for data.

Any thoughts or other suggestions on how to do this?
[Image: signature/]     [Image: sharing.png]
I cannot hear you. There is a banana in my ear.
04-08-2008 06:12 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On