diff --git a/Changelog.md b/Changelog.md
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,3 +1,8 @@
+### 0.4.5.0
+
+- Added function *ngxPid* to return the PID of the current worker process
+  cached in Nginx.
+
 ### 0.4.4.0
 
 - Using *WorkerProcessIsExiting* instead of *ThreadKilled* as required in
diff --git a/NgxExport/Tools.hs b/NgxExport/Tools.hs
--- a/NgxExport/Tools.hs
+++ b/NgxExport/Tools.hs
@@ -24,6 +24,7 @@
                        ,finalizeHTTPRequest
                        ,ngxRequestPtr
                        ,ngxNow
+                       ,ngxPid
     -- *** Time intervals
                        ,TimeInterval (..)
                        ,toSec
@@ -72,6 +73,7 @@
 import           Control.Concurrent
 import           GHC.Generics
 import           System.IO.Unsafe (unsafePerformIO)
+import           System.Posix.Types
 import           Safe
 
 -- | Terminates the Nginx worker process from a Haskell service.
@@ -124,6 +126,10 @@
 ngxNow :: IO CTime
 ngxNow = ngxCachedTimePtr >>= peek >>= peek . castPtr
 
+-- | Returns the /PID/ of the current worker process cached in Nginx.
+ngxPid :: IO CPid
+ngxPid = ngxCachedPid
+
 -- | Time intervals.
 data TimeInterval = Hr Int          -- ^ Hours
                   | Min Int         -- ^ Minutes
@@ -578,7 +584,7 @@
                    SingleShotService ->
                        ([|\conf_data__ -> unless $(eFstRun) $
                               handle
-                                  ((\_ -> void $ $(eF) conf_data__ False) ::
+                                  (const $ void $ $(eF) conf_data__ False ::
                                       WorkerProcessIsExiting -> IO ()
                                   ) $ forever $ threadDelaySec $ toSec $ Hr 24
                         |]
diff --git a/ngx-export-tools.cabal b/ngx-export-tools.cabal
--- a/ngx-export-tools.cabal
+++ b/ngx-export-tools.cabal
@@ -1,5 +1,5 @@
 name:                       ngx-export-tools
-version:                    0.4.4.0
+version:                    0.4.5.0
 synopsis:                   Extra tools for Nginx haskell module
 description:                Extra tools for
         <http://github.com/lyokha/nginx-haskell-module Nginx haskell module>.
@@ -20,7 +20,7 @@
                           , template-haskell >= 2.11.0.0
                           , bytestring >= 0.10.0.0
                           , binary >= 0.4
-                          , ngx-export >= 1.6.4
+                          , ngx-export >= 1.7.1
                           , aeson >= 1.0
                           , safe
 
