提交 83467de3 编写于 作者: G Guido Günther

add virKillProcess

上级 ffafc252
Tue Jan 6 18:44:34 CET 2009 Guido Günther <agx@sigxcpu.org>
add virKillProcess
* src/util.[ch] (virKillProcess): new function
* src/libvirt_private.syms: add symbol
Tue Jan 6 18:14:31 CET 2009 Guido Günther <agx@sigxcpu.org>
trivial cleanups
......
......@@ -292,6 +292,7 @@ virParseNumber;
virAsprintf;
virRun;
virSkipSpaces;
virKillProcess;
# uuid.h
......
......@@ -1337,3 +1337,14 @@ int virDiskNameToIndex(const char *name) {
return idx;
}
/* send signal to a single process */
int virKillProcess(pid_t pid, int sig)
{
if (pid < 1) {
errno = ESRCH;
return -1;
}
return kill(pid, sig);
}
......@@ -166,4 +166,6 @@ static inline int getuid (void) { return 0; }
static inline int getgid (void) { return 0; }
#endif
int virKillProcess(pid_t pid, int sig);
#endif /* __VIR_UTIL_H__ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册