mirror of
https://github.com/urbit/ares.git
synced 2024-12-24 13:55:23 +03:00
main: add stop_for_debug feature to stop Ares when it starts for a debugger to attach
This commit is contained in:
parent
f092c482ee
commit
820b1ac57a
@ -55,3 +55,4 @@ check_acyclic = []
|
|||||||
check_forwarding = []
|
check_forwarding = []
|
||||||
check_junior = []
|
check_junior = []
|
||||||
sham_hints = []
|
sham_hints = []
|
||||||
|
stop_for_debug = []
|
||||||
|
@ -5,10 +5,13 @@ use std::io;
|
|||||||
|
|
||||||
fn main() -> io::Result<()> {
|
fn main() -> io::Result<()> {
|
||||||
// debug
|
// debug
|
||||||
// eprintln!("serf: pid {}", std::process::id());
|
#[cfg(feature = "stop_for_debug")]
|
||||||
// if unsafe { libc::kill(std::process::id() as i32, libc::SIGSTOP) } != 0 {
|
{
|
||||||
// panic!("Could not stop ourselves.");
|
eprintln!("serf: pid {}", std::process::id());
|
||||||
// };
|
if unsafe { libc::kill(std::process::id() as i32, libc::SIGSTOP) } != 0 {
|
||||||
|
panic!("Could not stop ourselves.");
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
let filename = env::args().nth(1).expect("Must provide input filename");
|
let filename = env::args().nth(1).expect("Must provide input filename");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user