MacOS works now
This commit is contained in:
parent
8ee712e81a
commit
30dda02cc4
@ -378,12 +378,16 @@ do_gajudesk() ->
|
|||||||
GajuDesk = "zx run gajudesk",
|
GajuDesk = "zx run gajudesk",
|
||||||
Command =
|
Command =
|
||||||
case os:type() of
|
case os:type() of
|
||||||
{unix, _} -> detach_unix(GajuDesk);
|
{unix, darwin} -> detach_darwin(GajuDesk);
|
||||||
{win32, nt} -> detach_windows(GajuDesk)
|
{unix, _} -> detach_unix(GajuDesk);
|
||||||
|
{win32, nt} -> detach_windows(GajuDesk)
|
||||||
end,
|
end,
|
||||||
Out = os:cmd(Command),
|
Out = os:cmd(Command),
|
||||||
log(info, "os:cmd(~s) -> ~s", [Command, Out]).
|
log(info, "os:cmd(~s) -> ~s", [Command, Out]).
|
||||||
|
|
||||||
|
detach_darwin(Command) ->
|
||||||
|
"nohup " ++ Command ++ " >/dev/null 2>&1 & disown".
|
||||||
|
|
||||||
detach_unix(Command) ->
|
detach_unix(Command) ->
|
||||||
"setsid sh -c 'exec nohup " ++ Command ++ " >/dev/null 2>&1' &".
|
"setsid sh -c 'exec nohup " ++ Command ++ " >/dev/null 2>&1' &".
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user