Giter Site home page Giter Site logo

Comments (4)

lifo101 avatar lifo101 commented on June 17, 2024

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.

npub avatar npub commented on June 17, 2024

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.

npub avatar npub commented on June 17, 2024

Another way is to using of defined function to check all known signals before using.

if (defined('SIGPOLL')) {
    // do smth
}

from php-daemon.

lifo101 avatar lifo101 commented on June 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.