mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibCore: Add a wrapper for setsid()
This commit is contained in:
committed by
Ali Mohammad Pur
parent
9aa0cf3265
commit
3fa5be655d
@@ -551,6 +551,14 @@ ErrorOr<void> setpgid(pid_t pid, pid_t pgid)
|
||||
return {};
|
||||
}
|
||||
|
||||
ErrorOr<pid_t> setsid()
|
||||
{
|
||||
int rc = ::setsid();
|
||||
if (rc < 0)
|
||||
return Error::from_syscall("setsid"sv, -errno);
|
||||
return rc;
|
||||
}
|
||||
|
||||
ErrorOr<bool> isatty(int fd)
|
||||
{
|
||||
int rc = ::isatty(fd);
|
||||
|
||||
@@ -90,6 +90,7 @@ ErrorOr<void> seteuid(uid_t);
|
||||
ErrorOr<void> setgid(gid_t);
|
||||
ErrorOr<void> setegid(gid_t);
|
||||
ErrorOr<void> setpgid(pid_t pid, pid_t pgid);
|
||||
ErrorOr<pid_t> setsid();
|
||||
ErrorOr<bool> isatty(int fd);
|
||||
ErrorOr<void> symlink(StringView target, StringView link_path);
|
||||
ErrorOr<void> mkdir(StringView path, mode_t);
|
||||
|
||||
Reference in New Issue
Block a user