4 ms·
Getting bash to run was a major milestone. Getting that application (which hooks into IO, process control, console output, devices, security, among many, many
by ghshephard 10y ago
Getting bash to run was a major milestone. Getting that application (which hooks into IO, process control, console output, devices, security, among many, many other things) is orders of magnitude more complex than getting something like awk running (and it still isn't 100% complete). I guess, from my perspective, the major deliverable for WSL was bash. You could have gotten hundreds of other subsystems in the LTP delivered, and dozen of the major products like nginx, cassandra, etc.. running - but until I could hop onto the system with bash, it wasn't an environment that I could interact with (as opposed to my programs).
I guess we just have different priorities.
- partycoder 10y agoThere are many userland binaries that require far more system calls than bash. Take any general purpose programming language, like Python, Ruby or JavaScript on node as a simple example. Their libraries expose a lot of functionality that would finally translate into syscalls. So no. I disagree that bash was a major final milestone.
- ghshephard 10y agoHere is an interesting link for you: https://thenewstack.io/future-wsl-distro-independent-flexibl.. https://thenewstack.io/future-wsl-distro-independent-flexibl.... In particular, check out this tidbit: “Until you run Bash, no Linux process can run on your machine. As soon as you open Bash, you can choose to start any background services you want to have run. If you want to have MySQL or FSH or ssh or Postgres or Apache or whatever run, you can start them manually or autostart then with the .bashrc file,” Turner pointed out. “But as soon as you close the Bash console, we tear down any running Linux processes. So if you close the console window, you can no longer access your system via ssh, from your machine or any other.” Whats interesting about this, is bash really plays a significant role in anchoring the entire windows subsystem for linux - more so than what you would normally expect out of merely a shell - to some degree, it is your user environment.
- partycoder 10y agoThat's specific to a Windows implementation. bash is GNU bash, on every operating system. A Unix shell. It has been the same since 1989. The authority on what GNU bash is and what it is not is GNU, not Microsoft. Then GNU bash is not required to run stuff under Linux. There are system calls to run programs. e.g: http://man7.org/linux/man-pages/man2/execve.2.html http://man7.org/linux/man-pages/man2/execve.2.html Many distros do not even ship with GNU bash. The limitation you are referring to is purely artificial, since WSL implements those system calls (they're required to implement bash itself) and I bet they are going to be fixing it soon. I recommend you the following book: http://man7.org/tlpi http://man7.org/tlpi , go to Chapter 24. kthx
- ghshephard 10y agoI'm curious as to whether you realize that you've now taken so strong a position on this issue that you've blinded yourself to the evidence? I just gave you some information that showed that, the center of activity for Creators Edition is Bash. Bash is the only way that you can launch your linux subsystem on windows. Lots of work has been done on this Bash environment. It's entirely reasonable for Microsoft to say, "What's new in Bash/WSL and Windows Console" - as that's where they've done all the work. Bash is not just a Unix Shell in Microsoft's particular implementation - unlike every instance of Unix I've ever used (Starting with SunOs in 1993, but including zillions of iterations of Linux, OpenBSD, Solaris, etc...) - your shell on WSL is not just an entry into /etc/passwd, but instead is your operating environment - that, when it goes away, takes the entire process tree with it. I kind of get what you are saying, that you are irked that Microsoft is trying to take some ownership of Bash, when it's really a GNU property - but, honestly, this is more like a temporary fork. Right now, for Anniversary Edition and Creators Edition - Bash is the center of gravity (along with the console environment - tons of awesome stuff there). And I agree with you, that this feels like a temporary hook, and that in the future, WSL will be able to run without Bash - and that will be a good (great!) thing - crontab! And then, Bash will hopefully just return to being what it was before - just a shell. (Perhaps with a few extra WSL hooks than vanilla GNU Bash - but we've already agreed that each implementation of Bash will have those hooks, so nothing new there.) How about we both agree that Bash is a shell. Developed and Maintained by GNU. That is required by WSL right now to launch the linux subsystem, and therefore work by Microsoft on their Bash environment is important to WSL. Fair enough?