We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7056894 commit 2fc0a66Copy full SHA for 2fc0a66
sys_util/src/lib.rs
@@ -36,16 +36,3 @@ pub use libc_ioctl::*;
36
37
pub use mmap::Error as MmapError;
38
pub use guest_memory::Error as GuestMemoryError;
39
-
40
-use libc::{c_long, pid_t, syscall};
41
42
-use syscall_defines::linux::LinuxSyscall::SYS_getpid;
43
44
-/// This bypasses `libc`'s caching `getpid(2)` wrapper which can be invalid if a raw clone was used
45
-/// elsewhere.
46
-/// TODO(dpopa@): get rid of this when syslog is gone too
47
-#[inline(always)]
48
-pub fn getpid() -> pid_t {
49
- // Safe because this syscall can never fail and we give it a valid syscall number.
50
- unsafe { syscall(SYS_getpid as c_long) as pid_t }
51
-}
0 commit comments