mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 22:02:58 -06:00
21 lines
710 B
C
21 lines
710 B
C
////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
// a working (better ??) implementation of libsudo equivalent
|
|
// allows to run sudo either in sync or async mode
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
#ifndef _SysExec_SudoLib_h_
|
|
#define _SysExec_SudoLib_h_
|
|
|
|
#include <Core/Core.h>
|
|
|
|
NAMESPACE_UPP
|
|
|
|
#ifdef PLATFORM_POSIX
|
|
|
|
// executes a command via sudo; if wait is true, will wait for command end, otherwise executes it in background
|
|
bool SudoExec(String user, String const &password, String const &args, VectorMap<String, String> const &env, bool wait);
|
|
|
|
#endif
|
|
|
|
END_UPP_NAMESPACE
|
|
|
|
#endif
|