title: How can I call setsid()?
body: <p>I'm looking at a way to detach a sub-process in rust. Although as per default behavior it is detached, but it will not create a new session as in Posix <code>setsid()</code> call.</p>
  
  <p>Generally a pre_exec pattern is used between <code>fork()</code> and <code>exec()</code> calls to set session id. But the os/unix/process/CommandExt is not exposing such interface to issue syscalls in <a href="https://doc.rust-lang.org/std/os/unix/process/trait.CommandExt.html" rel="nofollow noreferrer">CommandExt</a></p>
  
  <p>Is there a way to issue Linux syscalls in Rust?</p>