<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hello,</div><div class=""><br class=""></div><div class="">There is a library (libunit) which may help you to write such external app. Unfortunately, it is not documented and can be changed in next releases, but all language modules written using this library API and you may use it too.</div><div class=""><br class=""></div><div class="">First, have a look at test external application in C: <a href="https://github.com/nginx/unit/blob/master/src/test/nxt_unit_app_test.c" class="">https://github.com/nginx/unit/blob/master/src/test/nxt_unit_app_test.c</a> . In spite of the fact the app is useless, it will give you some clue how to start. Next thing is reading comments in main header file of this library (<a href="https://github.com/nginx/unit/blob/master/src/nxt_unit.h" class="">https://github.com/nginx/unit/blob/master/src/nxt_unit.h</a>). And, of course, you may ask here, if something is still unclear or does not work as expected.</div><div class=""><br class=""></div><div class="">Best regards,</div><div class="">Max</div><br class=""><div><blockquote type="cite" class=""><div class="">On 26 Mar 2019, at 03:53 , Shane Spencer <<a href="mailto:spencersr@gmail.com" class="">spencersr@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi all.  I'm trying to get a generic external application working using python (rather than WSGI).  I can see the NXT_USER_INIT environment variable and the PIDs involved and what could possibly be fileno's for potential socket work.  I'm going to be giving that a test.<div class=""><br class=""></div><div class="">It sounds like the file descriptor may be use for retrieving extra control information (like listen port) however.<br class=""><br class="">Any extra info on external type commands would be awesome.  I don't see anything on public github that is parsing the environment variable NXT_USER_INIT to utilize that info.  Just trying to determine the next step once a command inits.</div><div class=""><br class=""></div><div class=""><div class=""><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><table border="0" cellpadding="0" cellspacing="0" class="">
    <tbody class="">
        <tr class="">
            <td align="left" valign="bottom" width="107" style="line-height:0;vertical-align:bottom;padding-right:10px;padding-top:20px;padding-bottom:20px" class="">
                <a href="https://about.me/ShaneSpencer?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=gmail_api&utm_content=thumb" style="text-decoration:none" target="_blank" class="">
                    <img src="https://thumbs.about.me/thumbnail/users/s/h/a/shanespencer_emailsig.jpg?_1528302522_788" alt="" width="105" height="70" style="margin:0;padding:0;display:block;border:1px solid #eeeeee" class="">
                </a>
            </td>
            <td align="left" valign="bottom" style="line-height:1.1;vertical-align:bottom;padding-top:20px;padding-bottom:20px" class="">
                <img src="https://about.me/t/sig?u=ShaneSpencer" width="1" height="1" style="border:0;margin:0;padding:0;width:1;height:1;overflow:hidden" class="">
                <div style="font-size:18px;font-weight:bold;color:#333333;font-family:'Proxima Nova',Helvetica,Arial,sans-serif!important" class="">Shane Spencer</div>
                <a href="https://about.me/ShaneSpencer?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=gmail_api&utm_content=thumb" style="text-decoration:none;font-size:12px;color:#2b82ad;font-family:'Proxima Nova',Helvetica,Arial,sans-serif!important" target="_blank" class="">about.me/ShaneSpencer
                </a>
            </td>
        </tr>
    </tbody>
</table>
</div></div></div></div></div></div>
_______________________________________________<br class="">unit mailing list<br class=""><a href="mailto:unit@nginx.org" class="">unit@nginx.org</a><br class="">https://mailman.nginx.org/mailman/listinfo/unit</div></blockquote></div><br class=""></body></html>