From: Ralph Lange <ralph.lange@gmx.de>
Date: Wed, 1 Jul 2020 13:42:33 +0200
Subject: Use long int for --coresize argument

Since the variable holding the core size is an `int`, users of
--coresize will have core dumps truncated and hence unusable if it is
greater than the size can hold (~2GB for most 64-bits platforms).

Use `long` to increase it to 64-bits on platforms that follow LP64 (most
Unix systems), providing enough room for any reasonable core size, while
keeping it limited to 2GB on LLP64 (such as MS Windows) [1].

[1] https://unix.org/whitepapers/64bit.html

Origin: upstream, https://github.com/ralphlange/procServ/commit/498687f49adf008ea206969ce06b4ce99c453d0d
Bug: https://github.com/ralphlange/procServ/issues/36
---
 procServ.cc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/procServ.cc b/procServ.cc
index 9656241..c050cb9 100755
--- a/procServ.cc
+++ b/procServ.cc
@@ -205,6 +205,7 @@ int main(int argc,char * argv[])
     int c;
     unsigned int i, j;
     int k;
+    long l;
     std::vector<std::string> ctlSpecs;
     char *command;
     bool bailout = false;
@@ -275,9 +276,9 @@ int main(int argc,char * argv[])
             break;
 
         case 'C':                                 // Core size
-            k = atoi( optarg );
-            if ( k >= 0 ) {
-                coreSize = k;
+            l = atol( optarg );
+            if ( l >= 0 ) {
+                coreSize = l;
                 setCoreSize = true;
             }
             break;
