mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:37:35 +00:00
LibCore: Add a wrapper for setsid()
This commit is contained in:
parent
9aa0cf3265
commit
3fa5be655d
2 changed files with 9 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue