]> git.pld-linux.org Git - packages/TiMidity++.git/blame - TiMidity++-detach.patch
- fixed config/libs search path, rel. 3
[packages/TiMidity++.git] / TiMidity++-detach.patch
CommitLineData
9d29e832
JK
1diff -dur TiMidity++-2.13.0.orig/interface/alsaseq_c.c TiMidity++-2.13.0/interface/alsaseq_c.c
2--- TiMidity++-2.13.0.orig/interface/alsaseq_c.c 2004-03-04 05:11:50.000000000 +0100
3+++ TiMidity++-2.13.0/interface/alsaseq_c.c 2004-09-15 18:42:41.549524231 +0200
4@@ -402,7 +402,11 @@
5 if (ctl.flags & CTLF_DAEMONIZE)
6 {
7 int pid = fork();
8+ int fd;
9 FILE *pidf;
10+ for(fd=0;fd<256;fd++){
11+ if (isatty(fd)) close(fd);
12+ }
13 switch (pid)
14 {
15 case 0: // child is the daemon
16@@ -414,6 +418,7 @@
17 fprintf( pidf, "%d\n", pid );
18 exit(0);
19 }
20+ setsid();
21 }
22
23 for (;;) {
This page took 0.030621 seconds and 4 git commands to generate.