OpenGrok search
   
Repository SCM Type: Parent (branch) Current version
nginx Mercurial: (default) 2024-02-14 20:03 +0400 89bf 2024-02-14 20:03 +0400 89bff782528a Sergey Kandaurov <pluknet@nginx.com> release-1.25.4 tag show more ...
unit Mercurial: (default) 2024-03-07 16:16 +0000 563f 2024-03-07 16:16 +0000 563f8f63b9b2 Andrew Clayton <a.clayton@nginx.com> Wasm-wc: Fix application restarts

Liam reported a problem when trying to restart wasm-wasi-component based
applications using the /control/applications/APPLICATION_NAME/restart
endpoint.

The application would become unresponsive.

What was happening was the old application process(es) weren't
exit(3)ing and so while we were starting new application processes, the
old ones were still hanging around in a non-functioning state.

When we are terminating an application it must call exit(3).

So that's what we do. We use the return value of nxt_unit_run() as the
exit status.

Due to exit(3)ing we also need to now explicitly handle the return on
error case.

Reported-by: Liam Crilly <liam@nginx.com>
Fixes: 20ada4b5c ("Wasm-wc: Core of initial Wasm component model language module support")
Closes: https://github.com/nginx/unit/issues/1179
Tested-by: Liam Crilly <liam@nginx.com>
Tested-by: Danielle De Leo <d.deleo@f5.com>
Co-developed-by: Dan Callahan <d.callahan@f5.com>
Signed-off-by: Dan Callahan <d.callahan@f5.com>
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
show more ...