Reputation: 11
I have a processes that is open and can retrieve variables but it is running in the back ground.
so i need to send a variable to the processes using the PID ?? is it possible in the command line to send a variable to a processes or to reconnect to a processes.
Upvotes: 1
Views: 846
Reputation: 10685
*nix type shells
You can reconnect to a process by doing fg [job id]
(which isn't the PID but you can find it by using the jobs
command from terminal)
IPC
You can also send variables into programs if the program is configured to accept it. It may read it off of a pipe, file, or network socket
A program is also able to receive signals (sent with the kill -[signal]
) if its simply waiting for a boolean message
For php, sending variables through these methods may involve serialization of the variables prior to transmission
Upvotes: 1
Reputation: 15374
Interprocess communication is often handled by sockets, which are supported in PHP. So if you have control over both applications you can set up sockets to communicate between them.
Upvotes: 1