projects
/
ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make root able to connect to any traceable app
[ust.git]
/
ustctl
/
scanning_functions.c
diff --git
a/ustctl/scanning_functions.c
b/ustctl/scanning_functions.c
index a3eceb535ed9fad1216b6c553a5445a589f8eeac..4aa8c1c93e81cf7c6cd675692129dd84c859c023 100644
(file)
--- a/
ustctl/scanning_functions.c
+++ b/
ustctl/scanning_functions.c
@@
-21,9
+21,10
@@
#include "usterr.h"
#include "usterr.h"
-
pid_t parse
_pid(const char *pid_string)
+
int parse_and_connect
_pid(const char *pid_string)
{
pid_t pid;
{
pid_t pid;
+ int sock;
errno = 0;
pid = strtoull(pid_string, NULL, 10);
errno = 0;
pid = strtoull(pid_string, NULL, 10);
@@
-32,7
+33,13
@@
pid_t parse_pid(const char *pid_string)
exit(EXIT_FAILURE);
}
exit(EXIT_FAILURE);
}
- return pid;
+ sock = ustctl_connect_pid(pid);
+ if (sock < 0) {
+ perror("Failed to connect to process");
+ exit(EXIT_FAILURE);
+ }
+
+ return sock;
}
int scan_ch_marker(const char *channel_marker, char **channel, char **marker)
}
int scan_ch_marker(const char *channel_marker, char **channel, char **marker)
This page took
0.024122 seconds
and
4
git commands to generate.