~spuul/nginx/trunk

« back to all changes in this revision

Viewing changes to debian/modules/nginx-lua/src/ngx_http_lua_worker.c

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2014-02-15 03:05:42 UTC
  • mfrom: (4.3.10 sid)
  • Revision ID: package-import@ubuntu.com-20140215030542-71ubtowl24vf7nfn
Tags: 1.4.5-1ubuntu1
* Resynchronise with Debian (LP: #1280511).  Remaining changes:
  - debian/patches/ubuntu-branding.patch:
    + Add Ubuntu branding to server_tokens.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/*
 
3
 * Copyright (C) Yichun Zhang (agentzh)
 
4
 */
 
5
 
 
6
 
 
7
#ifndef DDEBUG
 
8
#define DDEBUG 0
 
9
#endif
 
10
#include "ddebug.h"
 
11
 
 
12
 
 
13
#include "ngx_http_lua_worker.h"
 
14
 
 
15
 
 
16
static int ngx_http_lua_ngx_worker_exiting(lua_State *L);
 
17
 
 
18
 
 
19
void
 
20
ngx_http_lua_inject_worker_api(lua_State *L)
 
21
{
 
22
    lua_createtable(L, 0 /* narr */, 1 /* nrec */);    /* ngx.timer. */
 
23
 
 
24
    lua_pushcfunction(L, ngx_http_lua_ngx_worker_exiting);
 
25
    lua_setfield(L, -2, "exiting");
 
26
 
 
27
    lua_setfield(L, -2, "worker");
 
28
}
 
29
 
 
30
 
 
31
static int
 
32
ngx_http_lua_ngx_worker_exiting(lua_State *L)
 
33
{
 
34
    lua_pushboolean(L, ngx_exiting);
 
35
    return 1;
 
36
}