Comments (7)
@CGamesPlay
I don't understand what you said.
fish runs argc
argc locates Argcfile.sh and runsbash Argcfile.sh
bash does the rest
Which part needs improvement?
from argc.
Instead of running bash Argcfile.sh
as a subcommand, it should exec bash Argcfile.sh
. This would replace the argc process with the bash process. The desired process tree would look like this:
$ ps uf
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
ubuntu 2034 0.1 0.0 247380 17112 pts/1 Ss 10:40 0:06 -fish
ubuntu 36430 1.0 0.0 8664 5436 pts/1 S+ 11:53 0:00 \_ bash
from argc.
Three is no way to get rid of argc process in the ps tree.
Bash is invoked outside of the script, no exec exists.
from argc.
Yes, bash is invoked by argc
as a child process. The request is to exec
the process instead of spawn
ing it. Basically, switch to exec instead of status. By using exec
, the argc
process itself is replaced by bash
. Then the Argcfile.sh
can exec
another bash, resulting in the desired ps tree.
from argc.
Does exec return exit statuscode?
from argc.
No, it actually doesn't return at all. The argc
process would be entirely replaced by the target command. However, because the process is replaced in-place, the parent of argc
will continue waiting for the new process, and will receive the exit code from the new process once the new process finishes.
from argc.
Fantastic! Thank you 🙂
from argc.
Related Issues (20)
- Test failure for 1.1.0
- Completions issue with extended documentation
- Filename arguments invalidated after implicit cd
- Feature request: default subcommand HOT 5
- Eats all double-dashes
- Maintain default option when internally calling bash function HOT 1
- Better support for "external subcommands" HOT 1
- Support separate files for subcommand implementations HOT 8
- Output escaping is broken HOT 8
- [FR] Colored help HOT 3
- Add command to generate boilerplate argcfile.sh
- [gdb under argc] ctrl-c leads to terminate, not interrupt HOT 1
- Add completions for fish shell
- Arg with choices
- Argc is checking for non-cmd/alias function duplicates
- subcommand supports alias
- Add ability to force command string HOT 3
- How to define sub command specific args, flags and options HOT 1
- Multi-line documentation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from argc.