marcelog / Ding

DI ( Dependency Injection: Setter, Constructor, Method), AOP ( Aspect Oriented Programming ), Events support, xml, yaml, and annotations (including some JSR 250 and JSR 330, like @Configuration and @Bean ala java configuration) , lightweight, simple, and quick MVC ( Model View Controller ), syslog, tcp client and server, with non blocking sockets, custom error, signal, and exception handling through events. Needs PHP 5.3, very similar to seasar, spring ( java ) . Can be deployed as a PHAR file.
http://marcelog.github.com/Ding
Apache License 2.0
121 stars 26 forks source link

Use of undefined constant SIGQUIT if pcntl is not installed #121

Closed emurano closed 8 years ago

emurano commented 8 years ago

PHP Fatal error: Undefined constant 'SIGQUIT' in marcelog/ding/src/mg/Ding/Container/Impl/ContainerImpl.php:1074

Looking at that code it appears that if the code is running on Windows then Ding does not set any equivalent to signal handling.

I think Ding should check for PCNTL before trying to execute the this code. That way those of use who don't have it enabled (and can't) won't need to install it.

emurano commented 8 years ago

Sorry I should say this is on OSX/MAMP without pcntl enabled.

marcelog commented 8 years ago

Hi @emurano!

Could you check if the change in [d88c2f41104440e60b4bcd7d7893de340fc77c27] works for you? I'd also be interested in any comments from @jaehoo who made the original patch in [87c6f4673dc1c787594b7e58e885cc232312e32e].

Cheers,

emurano commented 8 years ago

Hi @marcelog,

I'll have a closer look to see where pcntl functions are used and I'll put the function_exists calls.

-Eric

emurano commented 8 years ago

Hi @marcelog,

Change d88c2f4 would do nicely!

-Eric

marcelog commented 8 years ago

Thank you @emurano, I just merged the change.

Cheers,

emurano commented 8 years ago

Thank you kindly!