Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
11-28-2009, 07:28 PM #1
- Join Date
- Nov 2009
- Thanked 0 Times in 0 Posts
Sockets and Interrupted system call
Just joined this site. Hi to everyone. Onwards to my problem:
I have a chat script running on my webserver (php). I do not have access to SSH / Telnet, so I used proc_open() to run my script.
The script is programmed to accept incoming socket connections, but for some reason, socket_select() gives an error:  Interrupted system call. This ends the script prematurely, disconnecting everyone who is logged into the chat.
For further reference, the chat script log is here: http://files.aeonus.com/chat.log.txt [scroll down to the bottom to see the error]
On searching google about this topic, I found out that for some unknown reason, the chat script is receiving a SIGINT (Interrupt signal) from the server, which usually happens when you run the script in terminal and press ^C (Control+C) to break it.
Can anyone suggest me a solution to this problem? Can the interrupt signal (SIGINT) be prevented? What might be causing it?
That is my first priority, since the signal can be ignored in php by using pcntl_signal() function, which requires process control library to be installed. (It isn't enabled by default)
Any help will be appreciated. Thanks.