mirror of
https://github.com/go-vgo/robotgo
synced 2026-05-24 02:08:33 +00:00
update godoc and code style
This commit is contained in:
parent
f0984bdabc
commit
adf02582ab
2 changed files with 5 additions and 6 deletions
|
|
@ -1551,7 +1551,8 @@ func FindNames() ([]string, error) {
|
|||
return strArr, err
|
||||
}
|
||||
|
||||
// FindIds finds the all processes named with a subset of "name" (case insensitive),
|
||||
// FindIds finds the all processes named with a subset
|
||||
// of "name" (case insensitive),
|
||||
// return matched IDs.
|
||||
func FindIds(name string) ([]int32, error) {
|
||||
var pids []int32
|
||||
|
|
|
|||
|
|
@ -121,8 +121,7 @@ int showAlert(const char *title, const char *msg, const char *defaultButton,
|
|||
*/
|
||||
static int runTask(const char *taskname, char * const argv[], int *exit_status);
|
||||
|
||||
static int xmessage(char *argv[], int *exit_status)
|
||||
{
|
||||
static int xmessage(char *argv[], int *exit_status) {
|
||||
// static const char * const MSG_PROGS[] = {"gmessage", "gxmessage",
|
||||
// "kmessage", "xmessage"};
|
||||
static const char * const MSG_PROGS[] = {"xmessage"};
|
||||
|
|
@ -154,8 +153,7 @@ static int xmessage(char *argv[], int *exit_status)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int runTask(const char *taskname, char * const argv[], int *exit_status)
|
||||
{
|
||||
static int runTask(const char *taskname, char * const argv[], int *exit_status) {
|
||||
pid_t pid = fork();
|
||||
int status;
|
||||
|
||||
|
|
@ -164,7 +162,7 @@ static int runTask(const char *taskname, char * const argv[], int *exit_status)
|
|||
perror("fork");
|
||||
return FORK_FAILED; /* Failed to fork. */
|
||||
case 0: /* Child process */
|
||||
if (strcmp(argv[0],"xmessage") == 0){
|
||||
if (strcmp(argv[0], "xmessage") == 0){
|
||||
execvp(taskname, argv);
|
||||
perror("execvp failed");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue