diff --git a/mythtv/libs/libmythbase/system-unix.cpp b/mythtv/libs/libmythbase/system-unix.cpp
index d96f405..9f2ec5a 100644
a
|
b
|
void MythSystemUnix::Fork(time_t timeout) |
629 | 629 | if (GetSetting("SetDirectory") && !dir.isEmpty()) |
630 | 630 | directory = strdup(dir.toUtf8().constData()); |
631 | 631 | |
| 632 | // check before fork to avoid QString use in child |
| 633 | bool setpgidsetting = GetSetting("SetPGID"); |
| 634 | |
632 | 635 | /* Do this before forking in case the child miserably fails */ |
633 | 636 | m_timeout = timeout; |
634 | 637 | if( timeout ) |
… |
… |
void MythSystemUnix::Fork(time_t timeout) |
763 | 766 | /* Set the process group id to be the same as the pid of this child |
764 | 767 | * process. This ensures that any subprocesses launched by this |
765 | 768 | * process can be killed along with the process itself. */ |
766 | | if (GetSetting("SetPGID") && setpgid(0,0) < 0 ) |
| 769 | if (setpgidsetting && setpgid(0,0) < 0 ) |
767 | 770 | { |
768 | 771 | cerr << locerr |
769 | 772 | << "setpgid() failed: " |