summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Golubev <fatzer2@gmail.com>2025-11-11 07:55:31 +0300
committerFat-Zer <fatzer2@gmail.com>2026-01-07 22:36:09 +0000
commit2bb1b1871e6bf8bb4daf471da7ada84b5f72d133 (patch)
tree1b607c7a6a18a23ded78a1ee61a3778ff26cda7d
parenta207aad2de0e551334a276604888a334886b6cb0 (diff)
downloadtdebase-2bb1b1871e6bf8bb4daf471da7ada84b5f72d133.tar.gz
tdebase-2bb1b1871e6bf8bb4daf471da7ada84b5f72d133.zip
twin/compton: remove no longer used old pid-file functions
Bug: https://mirror.git.trinitydesktop.org/gitea/TDE/tdebase/issues/673 Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
-rw-r--r--twin/compton-tde/common.h1
-rw-r--r--twin/compton-tde/compton.c57
2 files changed, 0 insertions, 58 deletions
diff --git a/twin/compton-tde/common.h b/twin/compton-tde/common.h
index 3ab731a9c..b3595fa29 100644
--- a/twin/compton-tde/common.h
+++ b/twin/compton-tde/common.h
@@ -65,7 +65,6 @@
// TDE specific options
// #define USE_ENV_HOME 1
-// #define WRITE_PID_FILE 1
#define _TDE_COMP_MGR_VERSION_ "3.00"
#if defined(HAVE_LIBCONFIG_OLD_API)
#define CONFIG_LIBCONFIG_LEGACY 1
diff --git a/twin/compton-tde/compton.c b/twin/compton-tde/compton.c
index 137c94819..52711341b 100644
--- a/twin/compton-tde/compton.c
+++ b/twin/compton-tde/compton.c
@@ -95,63 +95,6 @@ const static char *background_props_str[] = {
/// which could not have a pointer to current session passed in.
session_t *ps_g = NULL;
-// === Execution control ===
-
-void write_pid_file(pid_t pid)
-{
-#ifdef WRITE_PID_FILE
- const char *filename;
- const char *pidfile = "compton-tde.pid";
- char uidstr[sizeof(uid_t)*8+1];
- sprintf(uidstr, "%d", getuid());
- int n = strlen(P_tmpdir)+strlen(uidstr)+strlen(pidfile)+3;
- filename = (char*)malloc(n*sizeof(char)+1);
- memset(filename,0,n);
- strcat(filename, P_tmpdir);
- strcat(filename, "/.");
- strcat(filename, uidstr);
- strcat(filename, "-");
- strcat(filename, pidfile);
-
- /* now that we did all that by way of introduction...write the file! */
- FILE *pFile;
- char buffer[255];
- sprintf(buffer, "%d", pid);
- pFile = fopen(filename, "w");
- if (pFile) {
- fwrite(buffer,1,strlen(buffer), pFile);
- fclose(pFile);
- }
-
- free(filename);
- filename = NULL;
-#endif
-}
-
-void delete_pid_file()
-{
-#ifdef WRITE_PID_FILE
- const char *filename;
- const char *pidfile = "compton-tde.pid";
- char uidstr[sizeof(uid_t)*8+1];
- sprintf(uidstr, "%d", getuid());
- int n = strlen(P_tmpdir)+strlen(uidstr)+strlen(pidfile)+3;
- filename = (char*)malloc(n*sizeof(char)+1);
- memset(filename,0,n);
- strcat(filename, P_tmpdir);
- strcat(filename, "/.");
- strcat(filename, uidstr);
- strcat(filename, "-");
- strcat(filename, pidfile);
-
- /* now that we did all that by way of introduction...delete the file! */
- unlink(filename);
-
- free(filename);
- filename = NULL;
-#endif
-}
-
// === Fading ===
/**