RFC for Compiling Nginx as a Library

Sinan Kaya Okaya at kernel.org
Wed Jun 12 03:24:21 UTC 2019


On 6/3/2019 12:04 PM, Sinan Kaya wrote:
> Hi,
> 
> I have been using Nginx as a static library to embed into my application
> for some time.
> I'm interested in upstreaming the patches.
> 
> I wanted to ask if there would be any interest in merging this feature.
> 
> Sinan

I couldn't locate Maxim Dounin email but let me reply here with issues
that we have seen during testing.

There are two issues that we hit so far.

The first issue is about wait(-1) in nginx code. It prevents nginx
modules to use fork() API directly to do some external work.

I was wondering if we could replace wait(-1) with an actual list of
worker process PIDs.

The second issue that we hit is about timer_create(). Again, we are
unable to call timer_create() in our nginx module. Would it be possible
to relieve some of the nginx API enforcement.

I understand the desire to use nginx API in general but if someone
is porting an exiting code to nginx, they will most probably use POSIX
API for existing code.


More information about the nginx-devel mailing list