mirror of
https://github.com/mborgerson/xemu.git
synced 2025-12-01 16:10:01 +00:00
util: Introduce qemu_get_pid_name
This is a small helper that tries to fetch binary name for given PID. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Message-Id: <4d75d475c1884f8e94ee8b1e57273ddf3ed68bf7.1474987617.git.mprivozn@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
committed by
Paolo Bonzini
parent
6a7b2b2100
commit
7dc9ae4339
@ -387,6 +387,16 @@ void os_mem_prealloc(int fd, char *area, size_t sz, Error **errp);
|
||||
|
||||
int qemu_read_password(char *buf, int buf_size);
|
||||
|
||||
/**
|
||||
* qemu_get_pid_name:
|
||||
* @pid: pid of a process
|
||||
*
|
||||
* For given @pid fetch its name. Caller is responsible for
|
||||
* freeing the string when no longer needed.
|
||||
* Returns allocated string on success, NULL on failure.
|
||||
*/
|
||||
char *qemu_get_pid_name(pid_t pid);
|
||||
|
||||
/**
|
||||
* qemu_fork:
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user