summaryrefslogtreecommitdiff
path: root/community/udpxy/pidfile.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/udpxy/pidfile.patch')
-rw-r--r--community/udpxy/pidfile.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/community/udpxy/pidfile.patch b/community/udpxy/pidfile.patch
new file mode 100644
index 000000000..0adb24951
--- /dev/null
+++ b/community/udpxy/pidfile.patch
@@ -0,0 +1,48 @@
+diff --git a/udpxy.c b/udpxy.c
+index 43f213a..8f0e30d 100644
+--- a/udpxy.c
++++ b/udpxy.c
+@@ -1423,7 +1423,7 @@ udpxy_main( int argc, char* const argv[] )
+ }
+ }
+
+- rc = set_pidfile( g_udpxy_app, port, pidfile, sizeof(pidfile) );
++ rc = set_pidfile( g_udpxy_app, pidfile, sizeof(pidfile) );
+ if( 0 != rc ) {
+ mperror( g_flog, errno, "set_pidfile" );
+ rc = ERR_INTERNAL; break;
+diff --git a/util.c b/util.c
+index 0ad34bb..6b7daf8 100644
+--- a/util.c
++++ b/util.c
+@@ -302,7 +302,7 @@ make_pidfile( const char* fpath, pid_t pid, FILE* log )
+ * (fail if destination directory is not writable)
+ */
+ int
+-set_pidfile( const char* appname, int port, char* buf, size_t len )
++set_pidfile( const char* appname, char* buf, size_t len )
+ {
+ int n = -1;
+
+@@ -311,7 +311,7 @@ set_pidfile( const char* appname, int port, char* buf, size_t len )
+ if( -1 == access(PIDFILE_DIR, W_OK ) )
+ return -1;
+
+- n = snprintf( buf, len, "%s/%s%d.pid", PIDFILE_DIR, appname, port );
++ n = snprintf( buf, len, "%s/%s.pid", PIDFILE_DIR, appname );
+ if( n < 0 ) return EXIT_FAILURE;
+
+ buf[ len - 1 ] = '\0';
+diff --git a/util.h b/util.h
+index f274c7b..64a10d1 100644
+--- a/util.h
++++ b/util.h
+@@ -66,7 +66,7 @@ make_pidfile( const char* fpath, pid_t pid, FILE* log );
+ * (fail of destination directory is not writable)
+ */
+ int
+-set_pidfile( const char* appname, int port, char* buf, size_t len );
++set_pidfile( const char* appname, char* buf, size_t len );
+
+ /* write buffer to designated socket/file
+ * return number of bytes read/written or one of the error