mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-30 20:47:46 +00:00
Remove useless main functions and fix nohup on Macs
This commit is contained in:
parent
8fd455f8e5
commit
ae4ad2bb04
2 changed files with 1 additions and 7 deletions
|
@ -414,9 +414,6 @@ fn cut_files(mut filenames: Vec<String>, mode: Mode) -> int {
|
||||||
exit_code
|
exit_code
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
fn main() { os::set_exit_status(uumain(os::args())); }
|
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> int {
|
pub fn uumain(args: Vec<String>) -> int {
|
||||||
let opts = [
|
let opts = [
|
||||||
optopt("b", "bytes", "select only these bytes", "LIST"),
|
optopt("b", "bytes", "select only these bytes", "LIST"),
|
||||||
|
|
|
@ -46,9 +46,6 @@ fn _vprocmgr_detach_from_console(_: u32) -> *libc::c_int { std::ptr::null() }
|
||||||
#[cfg(target_os = "freebsd")]
|
#[cfg(target_os = "freebsd")]
|
||||||
fn rewind_stdout<T: std::rt::rtio::RtioFileStream>(_: &mut T) {}
|
fn rewind_stdout<T: std::rt::rtio::RtioFileStream>(_: &mut T) {}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
fn main () { std::os::set_exit_status(uumain(std::os::args())); }
|
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> int {
|
pub fn uumain(args: Vec<String>) -> int {
|
||||||
let program = args.get(0);
|
let program = args.get(0);
|
||||||
|
|
||||||
|
@ -78,7 +75,7 @@ pub fn uumain(args: Vec<String>) -> int {
|
||||||
|
|
||||||
unsafe { signal(SIGHUP, SIG_IGN) };
|
unsafe { signal(SIGHUP, SIG_IGN) };
|
||||||
|
|
||||||
if _vprocmgr_detach_from_console(0) != std::ptr::null() { crash!(2, "Cannot detach from console")};
|
if unsafe { _vprocmgr_detach_from_console(0) } != std::ptr::null() { crash!(2, "Cannot detach from console")};
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
// we ignore the memory leak here because it doesn't matter anymore
|
// we ignore the memory leak here because it doesn't matter anymore
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue