Log in

No account? Create an account

A Fun Unix Problem

Here's a fun (Unix) systems problem that popped into my head a few minutes ago:If you wanted to make a Unix shell that maintained the POSIX Shell semantics and had all the functionality of bash (with the same interface), but neither creates subshells (except for fork/exec of an external program) nor needs a separate instance for each login session or shell the user (directly) launches:

  • How would you do it?
  • What are the limitations of your approach?
  • Are there any advantages to this approach without changing the external behaviour?
  • Does it open the door to useful changes to external behaviour?
  • What are the hardest challenges you imagine dealing with while designing/implementing this?
  • What software would you like to review for ideas when making design/implementation choices for this? Are there external libraries you'd like to use that would make some of this easier?

I suspect this would be a good interview question for a systems geek. (And no, I've never been asked anything like this in any interview, nor does this relate to anything for work, as I am currently mostly unemployed)

(Crossposting this to G+, because some people I'm only connected to there probably appreciate the neat problem)