mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-05-14 05:52:48 +00:00
Write unshare pid into file for scripting purposes
This commit is contained in:
parent
4554d3bc55
commit
07ffbe057c
2 changed files with 13 additions and 2 deletions
|
@ -32,6 +32,11 @@ pub struct Args {
|
|||
#[arg(long)]
|
||||
pub unshare: bool,
|
||||
|
||||
/// Create a pidfile of `unshare` process when using `--unshare`.
|
||||
#[cfg(target_os = "linux")]
|
||||
#[arg(long)]
|
||||
pub unshare_pidfile: Option<String>,
|
||||
|
||||
/// File descriptor for UNIX datagram socket meant to transfer
|
||||
/// network sockets from global namespace to the new one.
|
||||
/// See `unshare(1)`, `namespaces(7)`, `sendmsg(2)`, `unix(7)`.
|
||||
|
@ -103,6 +108,8 @@ impl Default for Args {
|
|||
#[cfg(target_os = "linux")]
|
||||
unshare: false,
|
||||
#[cfg(target_os = "linux")]
|
||||
unshare_pidfile: None,
|
||||
#[cfg(target_os = "linux")]
|
||||
socket_transfer_fd: None,
|
||||
#[cfg(target_os = "linux")]
|
||||
admin_command: Vec::new(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue