MacOS works now

This commit is contained in:
Craig Everett 2025-11-20 10:39:26 +09:00
parent 8ee712e81a
commit 30dda02cc4

View File

@ -378,12 +378,16 @@ do_gajudesk() ->
GajuDesk = "zx run gajudesk",
Command =
case os:type() of
{unix, _} -> detach_unix(GajuDesk);
{win32, nt} -> detach_windows(GajuDesk)
{unix, darwin} -> detach_darwin(GajuDesk);
{unix, _} -> detach_unix(GajuDesk);
{win32, nt} -> detach_windows(GajuDesk)
end,
Out = os:cmd(Command),
log(info, "os:cmd(~s) -> ~s", [Command, Out]).
detach_darwin(Command) ->
"nohup " ++ Command ++ " >/dev/null 2>&1 & disown".
detach_unix(Command) ->
"setsid sh -c 'exec nohup " ++ Command ++ " >/dev/null 2>&1' &".