forked from danielpaulus/go-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make remoted management OS specific
- Loading branch information
1 parent
317ae7c
commit 0dc2543
Showing
7 changed files
with
60 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package remoted | ||
|
||
// Sends SIGSTOP to remoted process. | ||
// Implemented only on Darwin systems, as remoted service is present only on Darwin systems | ||
func StopRemoted() error { | ||
return stopRemoted() | ||
} | ||
|
||
// Sends SIGCONT to remoted process. | ||
// Implemented only on Darwin systems, as remoted service is present only on Darwin systems | ||
func ContinueRemoted() error { | ||
return continueRemoted() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//go:build darwin | ||
|
||
package remoted | ||
|
||
import ( | ||
"syscall" | ||
|
||
"github.com/pbar1/pkill-go" | ||
) | ||
|
||
func stopRemoted() error { | ||
_, err := pkill.Pkill("remoted", syscall.SIGSTOP) | ||
return err | ||
} | ||
|
||
func continueRemoted() error { | ||
_, err := pkill.Pkill("remoted", syscall.SIGCONT) | ||
return err | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//go:build !darwin | ||
|
||
package remoted | ||
|
||
// As remoted is present only on Darwin systems, default implementation is empty | ||
|
||
func stopRemoted() error { | ||
return nil | ||
} | ||
|
||
func continueRemoted() error { | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters