Hi, let me reopen this discussion about status code of the init script
(kamailio master process which runs daemonized main process).

I'm pretty sure that lot time ago, when I submitted a commit for
daemonice.c (including a PIPE to comunicate main process with master
process) it did work as expected. This is, if I set a listen address
in which my system cannot bind, I got error status code (1) when
running kamailio in daemonized mode (/etc/init.d/kamailio start
returned error).

Later I know there were some changes about such code, not sure which
ones as I didn't inspect them. However thinkgs don't work at all in
3.1.2 (or they work bad, as in Kamailio <= 1.5).

Basically I set a wrong listen address (not a local address), so
kamailio fails to start, but the init script returns 0 (OK). This is
making crazy my HeartBeat systems. Kamailio logs:

  init script return code:
  -------------------------------------
    ~# /etc/init.d/kamailio start ; echo "*** status code: $?"

    Starting kamailio: kamailioloading modules under
    /usr/lib/kamailio/modules_k:/usr/lib/kamailio/modules

    Listening on
        udp: X.X.X.X [X.X.X.X]:5060
        tcp: X.X.X.X [X.X.X.X]:5060
   Aliases:
       *: xxxxxx.xxxxxx.xx:*
  .
  *** status code: 0
  -------------------------------------


  kamailio log:
  -------------------------------------
    ERROR: <core> [udp_server.c:400]: ERROR: udp_init:
    bind(7, 0x8e53f4, 16) on X.X.X.X: Cannot assign requested address
  ------------------------------------



Could I know which is the expected behaviour (about return codes) in
latest version of Kamailio?

Thanks a lot.

-- 
Iñaki Baz Castillo
<[email protected]>

_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to