mirror of
https://github.com/zhboner/realm.git
synced 2026-11-17 08:15:55 +00:00
add more detailed docs for realm_syscall
This commit is contained in:
Generated
+1
-1
@@ -861,7 +861,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "realm_syscall"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
dependencies = [
|
||||
"daemonize",
|
||||
"libc",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "realm_syscall"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
authors = ["zephyr <i@zephyr.moe>"]
|
||||
description = "Realm's convenient syscall collections"
|
||||
repository = "https://github.com/zhboner/realm/realm_syscall"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
use std::env::current_dir;
|
||||
use daemonize::Daemonize;
|
||||
|
||||
/// Daemonize.
|
||||
///
|
||||
/// Fork the process in the background,
|
||||
/// disassociate from process group and the control terminal.
|
||||
///
|
||||
|
||||
@@ -2,6 +2,7 @@ use std::io::{Error, Result};
|
||||
use libc::{rlimit, rlim_t, RLIMIT_NOFILE};
|
||||
|
||||
/// Set nofile limitation.
|
||||
///
|
||||
/// `CAP_NET_ADMIN` privilege is required if exceeds hard limitation.
|
||||
///
|
||||
/// Reference:
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
use std::io::Result;
|
||||
use socket2::{Socket, Domain, Type};
|
||||
|
||||
/// Create a new socket.
|
||||
/// Create a new non-blocking socket.
|
||||
///
|
||||
/// On unix-like platforms, [`SOCK_NONBLOCK`](libc::SOCK_NONBLOCK) and
|
||||
/// [`SOCK_CLOEXEC`](libc::SOCK_CLOEXEC) are assigned
|
||||
/// when creating a new socket, which saves a [`fcntl`](libc::fcntl) syscall.
|
||||
///
|
||||
/// On other platforms, a socket is created without extra flags
|
||||
/// then set to `non_blocking`.
|
||||
#[cfg(any(
|
||||
target_os = "android",
|
||||
target_os = "dragonfly",
|
||||
|
||||
Reference in New Issue
Block a user