| ... | ... | @@ -1834,20 +1834,23 @@ pub fn setgroups(size: usize, list: [*]const gid_t) usize { |
| 1834 | 1834 | } |
| 1835 | 1835 | } |
| 1836 | 1836 | |
| 1837 | | pub fn setsid() pid_t { |
| 1838 | | return @bitCast(@as(u32, @truncate(syscall0(.setsid)))); |
| 1837 | pub fn setsid() usize { |
| 1838 | return syscall0(.setsid); |
| 1839 | 1839 | } |
| 1840 | 1840 | |
| 1841 | 1841 | pub fn getpid() pid_t { |
| 1842 | | return @bitCast(@as(u32, @truncate(syscall0(.getpid)))); |
| 1842 | // Casts result to a pid_t, safety-checking >= 0, because getpid() cannot fail |
| 1843 | return @intCast(@as(u32, @truncate(syscall0(.getpid)))); |
| 1843 | 1844 | } |
| 1844 | 1845 | |
| 1845 | 1846 | pub fn getppid() pid_t { |
| 1846 | | return @bitCast(@as(u32, @truncate(syscall0(.getppid)))); |
| 1847 | // Casts result to a pid_t, safety-checking >= 0, because getppid() cannot fail |
| 1848 | return @intCast(@as(u32, @truncate(syscall0(.getppid)))); |
| 1847 | 1849 | } |
| 1848 | 1850 | |
| 1849 | 1851 | pub fn gettid() pid_t { |
| 1850 | | return @bitCast(@as(u32, @truncate(syscall0(.gettid)))); |
| 1852 | // Casts result to a pid_t, safety-checking >= 0, because gettid() cannot fail |
| 1853 | return @intCast(@as(u32, @truncate(syscall0(.gettid)))); |
| 1851 | 1854 | } |
| 1852 | 1855 | |
| 1853 | 1856 | pub fn sigprocmask(flags: u32, noalias set: ?*const sigset_t, noalias oldset: ?*sigset_t) usize { |