#! /bin/sh /usr/share/dpatch/dpatch-run ## 10-osdsh-create-fifo-before-fork.dpatch by Peter Colberg ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: No description. @DPATCH@ diff -urNad osdsh-0.7.0~/src/osdsh/controlsh.c osdsh-0.7.0/src/osdsh/controlsh.c --- osdsh-0.7.0~/src/osdsh/controlsh.c 2007-01-12 13:40:21.000000000 +0100 +++ osdsh-0.7.0/src/osdsh/controlsh.c 2007-01-12 13:40:21.000000000 +0100 @@ -210,10 +210,6 @@ initialize_osd(&settings); load_basic_plugins(); - /* create the fifo file*/ - unlink(fifo_file); - umask(0); - mknod(fifo_file, S_IFIFO|0600, 0); /*open and read the fifo*/ while (settings.displaying) { fp = fopen(fifo_file, "r"); diff -urNad osdsh-0.7.0~/src/osdsh/osdsh.c osdsh-0.7.0/src/osdsh/osdsh.c --- osdsh-0.7.0~/src/osdsh/osdsh.c 2007-01-12 13:40:21.000000000 +0100 +++ osdsh-0.7.0/src/osdsh/osdsh.c 2007-01-12 13:42:49.000000000 +0100 @@ -152,6 +152,7 @@ char pid_file[PATH_MAX+1]; FILE *fp; + char fifo_file[PATH_MAX +1]; set_defaults(&settings); initialize_osd(&settings); @@ -169,6 +170,12 @@ pppset = mixerset = settings; */ + /* create the fifo file*/ + sprintf(fifo_file, "%s.%d", OSD_FIFO_PATH, getuid()); + unlink(fifo_file); + umask(0); + mknod(fifo_file, S_IFIFO|0600, 0); + if((childpid=fork())<0) { perror("fork"); exit(1);