mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-07-09 20:05:53 +00:00
commit before starting work on helper
This commit is contained in:
2
sources/3rdparty/task/taskadds.cpp
vendored
2
sources/3rdparty/task/taskadds.cpp
vendored
@ -22,7 +22,7 @@
|
||||
TaskResult runTask(const QString cmd)
|
||||
{
|
||||
return Task::await<TaskResult>( [ & ]() {
|
||||
QProcess command;
|
||||
SandboxProcess command;
|
||||
command.start(cmd);
|
||||
command.waitForFinished(-1);
|
||||
TaskResult r;
|
||||
|
11
sources/3rdparty/task/taskadds.h
vendored
11
sources/3rdparty/task/taskadds.h
vendored
@ -20,10 +20,21 @@
|
||||
#define TASKADDS_H
|
||||
|
||||
#include <QProcess>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "task.h"
|
||||
|
||||
|
||||
class SandboxProcess : public QProcess
|
||||
{
|
||||
protected:
|
||||
void setupChildProcess()
|
||||
{
|
||||
::setuid(0);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
struct TaskResult
|
||||
{
|
||||
int exitCode;
|
||||
|
Reference in New Issue
Block a user