AuroraRuntime/Source/Processes/Open.Linux.cpp
Reece 99c5e1fa65 A pretty large patch not worth breaking up into separate commits
[*] Split up Aurora Async
[*] Split Async app into seperate ThreadPool concept
[*] Fix various OSThread bugs and tls transfer issues
[*] Set default affinity to 0xFFFFFFFF
[*] Update Build script
[+] Add AuTuplePopFront
[+] New Network Interface (unimplemented)
[*] Stub out the interfaces required for a better logger
[*] Fix Win32 ShellExecute bug; windows 11 struggles without explicit com init per the docs - now deferring to thread pool
[*] Update gitignore
[*] Follow XDG home standard
[*] Refactor some namespaces to use the shorthand aliases
[*] Various stability fixes
2021-11-05 17:34:23 +00:00

36 lines
713 B
C++

/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: Open.Linux.cpp
Date: 2021-6-12
Author: Reece
***/
#pragma once
#include <RuntimeInternal.hpp>
#include "Processes.hpp"
#include "Open.Linux.hpp"
#include <unistd.h>
#include <Source/IO/FS/FS.hpp>
namespace Aurora::Processes
{
static void LinuxOpenAsync(const AuString &open)
{
if (fork() == 0)
{
setsid();
execl("xdg-open", open.c_str());
}
}
AUKN_SYM void OpenUri(const AuString &uri)
{
LinuxOpenAsync(uri);
}
AUKN_SYM void OpenFile(const AuString &file)
{
LinuxOpenAsync(IO::FS::NormalizePathRet(file));
}
}