Comments (4)
One work-around, for now, is to overload the Daemon#setupSignals
method and do not call getSignals
. Instead just build your own list of signals to process. Those signals must have been removed in v5.6? The environment I'm using this daemon code in is still v5.4.
I suppose the getSignals
method could be changed to protected instead of private to allow for overloading.
from php-daemon.
Those signals must have been removed in v5.6?
Output of kill -l
command:
macOS 10.13
1 ) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL
5 ) SIGTRAP 6) SIGABRT 7) SIGEMT 8) SIGFPE
9 ) SIGKILL 10) SIGBUS 11) SIGSEGV 12) SIGSYS
13 ) SIGPIPE 14) SIGALRM 15) SIGTERM 16) SIGURG
17 ) SIGSTOP 18) SIGTSTP 19) SIGCONT 20) SIGCHLD
21 ) SIGTTIN 22) SIGTTOU 23) SIGIO 24) SIGXCPU
25 ) SIGXFSZ 26) SIGVTALRM 27) SIGPROF 28) SIGWINCH
29 ) SIGINFO 30) SIGUSR1 31) SIGUSR2
FreeBSD 10-11
HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM URG STOP TSTP CONT CHLD TTIN TTOU IO XCPU XFSZ VTALRM PROF WINCH INFO USR1 USR2 LWP
Seems like these signals are absent at all in that systems.
I suppose the getSignals method could be changed to protected instead of private to allow for overloading.
Changing to private works :)
And Daemon::setupSignals
is better solution and will be great!
from php-daemon.
Another way is to using of defined
function to check all known signals before using.
if (defined('SIGPOLL')) {
// do smth
}
from php-daemon.
Another way is to using of defined function to check all known signals before using.
Yeah, I thought of that. Would just need to change the constants in getSignals to strings instead.
from php-daemon.
Related Issues (20)
- Documentation HOT 5
- Worker and pcntl_exec support HOT 9
- Forking Exception: Can't find PDO driver HOT 1
- Arguments to Tasks HOT 4
- How to write unit tests with your daemon? HOT 3
- what happens if a loop is still executing when the interval comes up? HOT 6
- Memory leak in workers HOT 17
- SySV Errors after a while. HOT 2
- Logging Failure after Restart HOT 1
- Premature worker death HOT 1
- Method returns current worker proc count? HOT 1
- Parameters on Task->run causing Fatal Error HOT 2
- Daemon Restart Event Hook HOT 3
- Using callable in worker initialization HOT 2
- Possible memory leak HOT 2
- Where to catch Premature worker death and processed it HOT 3
- PHP 8.x HOT 2
- Use with MQTT Server
- How do I pass variables to workers/tasks? HOT 1
- Sysv Error: Error fetching message from queue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-daemon.