diff options
Diffstat (limited to 'meta-demoapps/recipes-sato/clipboard-manager/files/daemonize.patch')
| -rw-r--r-- | meta-demoapps/recipes-sato/clipboard-manager/files/daemonize.patch | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/meta-demoapps/recipes-sato/clipboard-manager/files/daemonize.patch b/meta-demoapps/recipes-sato/clipboard-manager/files/daemonize.patch deleted file mode 100644 index 24c11a9fa8..0000000000 --- a/meta-demoapps/recipes-sato/clipboard-manager/files/daemonize.patch +++ /dev/null | |||
| @@ -1,46 +0,0 @@ | |||
| 1 | Upstream-Status: Inappropriate [enable feature] | ||
| 2 | |||
| 3 | Index: 0.6.4/manager.c | ||
| 4 | =================================================================== | ||
| 5 | --- 0.6.4.orig/manager.c 2007-06-28 12:23:37.000000000 +0100 | ||
| 6 | +++ 0.6.4/manager.c 2007-06-28 12:36:14.000000000 +0100 | ||
| 7 | @@ -68,7 +68,8 @@ | ||
| 8 | ClipboardManager *manager; | ||
| 9 | int terminated = False; | ||
| 10 | Display *display; | ||
| 11 | - | ||
| 12 | + pid_t pid; | ||
| 13 | + | ||
| 14 | display = XOpenDisplay (NULL); | ||
| 15 | |||
| 16 | if (!display) | ||
| 17 | @@ -83,6 +84,29 @@ | ||
| 18 | exit (1); | ||
| 19 | } | ||
| 20 | |||
| 21 | + /* deamonize */ | ||
| 22 | + pid = fork(); | ||
| 23 | + switch (pid) | ||
| 24 | + { | ||
| 25 | + case -1: fprintf (stderr, "Fork failed.\n"); | ||
| 26 | + /* Fall through */ | ||
| 27 | + default: exit(0); break; | ||
| 28 | + case 0: break; | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + chdir ("/"); | ||
| 32 | + setsid (); | ||
| 33 | + umask (0); | ||
| 34 | + | ||
| 35 | + pid = fork(); | ||
| 36 | + switch (pid) | ||
| 37 | + { | ||
| 38 | + case -1: fprintf (stderr, "Fork failed.\n"); | ||
| 39 | + /* Fall through */ | ||
| 40 | + default: exit(0); break; | ||
| 41 | + case 0: break; | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | XSetErrorHandler (x_error); | ||
| 45 | manager = clipboard_manager_new (display, | ||
| 46 | error_trap_push, error_trap_pop, | ||
