[zeromq-dev] ZMQ fails to start on ARM target
Mike Smith
msmith at cellwatch.com
Tue Dec 31 18:43:41 CET 2013
Hi,
I'm building an embedded device on an ARM target, using ZMQ library for communication among processes. This normally works well, but I've encountered a problem: If I build a simple daemon (background stand-alone app), or run ZMQ-PHP extension in (Lighttpd), the app hangs when "zmq_socket()" is called. The daemon code, in simplified form, is
- daemonize (e.g., example from "Advanced Programming in the Unix Environment", Stephens/Rago)
- set two signal handlers (SIGTERM and SIGHUP)
- context = zmq_ctx_new();
- // >>> hangs forever at the following line: >>>
- responder = zmq_socket( context, ZMQ_REP);
- // <<< should have continued here <<<:
- loop to "Hello" server example, waiting for client connection...
The target system is Linux kernel 2.6.39, using Busybox and uClibC. The above example works as expected on Ubuntu desktop VM, and elsewhere, but not on the target, although ZMQ works in general.
Similar web examples in PHP exhibit the same behavior when delivered by Lighttpd, i.e., hang forever at socket creation. The same web example will run correctly in PHP from the Command Line, that is, the ZMQ extension works correctly in that instance.
In my above daemon example, the only difference I can find between a working and a non-working instance is the addition of signal handlers and daemonization.
Does anyone have similar embedded experience, or could someone suggest a method of debug that might yield a solution?
Thanks,
Mike Smith, NDSL
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20131231/3f2a6515/attachment.htm>
More information about the zeromq-dev
mailing list