* Bump nushell-sytem dep to ntapi 0.4
0.3.7 trigger a warning about code being incompatible
with future rust versions. This is resolved in 0.4
https://github.com/MSxDOS/ntapi/issues/11
* Upgrade Cargo.lock for ntapi 0.4
Avoids compiling the crate twice due to incompatible versions from
dependencies. This avoids binary bloat before linking as well.
Narrow our feature selection to the used modules/functions to save
compile time. On my machine reduces `nix` crate compile time from
around 9 secs to 0.9 secs.
* Revert "Revert "Try again: in unix like system, set foreground process while running external command (#6273)" (#6542)"
This reverts commit 2bb367f570.
* Make foreground job control hopefully work correctly
These changes are mostly inspired by the glibc manual.
* Fix typo in external command description
* Only restore tty control to shell when no fg procs are left; reuse pgrp
* Rework terminal acquirement code to be like fish
Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
* Fix ps command CPU usage on Apple Silicon M1 macs. #4142
The cpu user and system times returned my libproc are not in
nanoseconds; they are in mach ticks units. This is not documented very
well. The convert from mach ticks to ns, the kernel provides a timebase
info function and datatype:
https://developer.apple.com/documentation/driverkit/3433733-mach_timebase_info
The commit makes the PS command work for me.
* Cargo fmt of previous commit.
* Clippy format suggestion
Co-authored-by: Ondrej Baudys <ondrej.baudys@nextgen.net>
* nu-path: use 'linux' code on all non-macOS unix
* nu-command: cfg() the Ps command to platforms it's actually implemented on
* nu-system: cfg() the Ps test to the platforms Ps is implemented on
* Revert "Fix intermittent test crash (#6268)"
This reverts commit 555d9ee763.
* make a working version again
* try second impl
* add
* fmt
* check stdin is atty before acquire stdin
* add libc
* clean comment
* fix typo
* while executing external command, make it as foreground
* remove useless file
* add comment, make var more readable
* add comment
* fmt code
* fix windows
* fix func name
* fix clippy
* fix windows clippy
* add comments, introduce `ForegroundProcess and ForegroundChild
* fix windows clippy
* fix on windows
* no need fg_process_setup module
* Revert "no need fg_process_setup module"
This reverts commit 21ee4ffbf6.
* restrict visibility for helper functions
* Remove unused packages from base Cargo.toml
* Remove unused crossterm_winapi from nu-cli
* Remove unused dependencies from nu-system
* Remove unused dependencies from nu-test-support
* Add android as target os for procfs-based ps
* Turn off code for dealing with trash on platforms which are known to not support a standard trash protocol
* Update lib.rs
* Update lib.rs
Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>