Skip to content

Commit

Permalink
Dev (#28)
Browse files Browse the repository at this point in the history
* Enhance process restart commands for Linux and Windows

Updated the process restart commands to properly handle filenames with spaces or special characters on both Linux and Windows. For Linux, enclosed filenames within single quotes and adjusted the process start command. For Windows, added double quotes around filenames to ensure proper execution.

* Refactor shell command and add Kill method.

Refactor shell command execution to streamline syntax by removing unnecessary quotes. Additionally, introduce a P/Invoke for the Kill method to facilitate sending signals in Unix-based OS environments.
  • Loading branch information
GamerVII-NET authored Jul 6, 2024
1 parent ace33d2 commit 90ffad6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Gml.Client/GmlClientManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ private void FileReplaceAndRestart(OsType osType, string newFileName, string ori
Environment.Exit(0);
}

[DllImport("libc")]
private static extern int Kill(int pid, int sig);

public Task<ResponseMessage<ProfileReadInfoDto?>?> GetProfileInfo(ProfileCreateInfoDto profileDto)
=> _apiProcedures.GetProfileInfo(profileDto);

Expand Down

0 comments on commit 90ffad6

Please sign in to comment.