mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
neutrino: convert most parts to use safe_system()
e.g. network setup was leaking demux file descriptors to udhcpc leading to strange issues later when trying to restart neutrino etc.
This commit is contained in:
@@ -3,12 +3,13 @@
|
||||
|
||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||
Copyright (C) 2011 CoolStream International Ltd
|
||||
Copyright (C) 2011 Stefan Seyfried
|
||||
|
||||
License: GPL
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
@@ -17,8 +18,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
@@ -47,6 +47,7 @@
|
||||
#include <daemonc/remotecontrol.h>
|
||||
#include <system/setting_helpers.h>
|
||||
#include <system/fsmounter.h>
|
||||
#include <system/safe_system.h>
|
||||
#include <gui/nfs.h>
|
||||
|
||||
#include <driver/record.h>
|
||||
@@ -1415,7 +1416,7 @@ bool CRecordManager::RunStartScript(void)
|
||||
return false;
|
||||
|
||||
puts("[neutrino.cpp] executing " NEUTRINO_RECORDING_START_SCRIPT ".");
|
||||
if (system(NEUTRINO_RECORDING_START_SCRIPT) != 0) {
|
||||
if (safe_system(NEUTRINO_RECORDING_START_SCRIPT) != 0) {
|
||||
perror(NEUTRINO_RECORDING_START_SCRIPT " failed");
|
||||
return false;
|
||||
}
|
||||
@@ -1429,7 +1430,7 @@ bool CRecordManager::RunStopScript(void)
|
||||
return false;
|
||||
|
||||
puts("[neutrino.cpp] executing " NEUTRINO_RECORDING_ENDED_SCRIPT ".");
|
||||
if (system(NEUTRINO_RECORDING_ENDED_SCRIPT) != 0) {
|
||||
if (safe_system(NEUTRINO_RECORDING_ENDED_SCRIPT) != 0) {
|
||||
perror(NEUTRINO_RECORDING_ENDED_SCRIPT " failed");
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user