AuroraRuntime/Source/Processes/Open.Linux.cpp

35 lines
642 B
C++
Raw Normal View History

2021-06-27 21:25:29 +00:00
/***
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>
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)
{
OpenUri(uri);
}
AUKN_SYM void OpenFile(const AuString &file)
{
OpenUri(file);
}
}