Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

13
  • 1
    "What would be nice if the user's shell scripts could inherit from a base shell script, somehow." Please don't use shell for this. It's not really a language. It IS for glue scripts, and nothing else. Every shell scripting "framework" I've seen (without exception) is (a) complex, (b) buggy, (c) a nightmare for the poor sap who gets to inherit and attempt to maintain it. Commented Sep 6, 2017 at 4:23
  • Yeah I hear ya, this is just for putting one shell script in between stuff, I doubt very many poor saps will be sapped. Commented Sep 6, 2017 at 4:34
  • @Wildcard can you speak to why calling the trap_and_kill_child_jobs function wouldn't invoke trap to actually work? Commented Sep 6, 2017 at 19:44
  • Without seeing the rest of your script, no, I can't. You don't show any child jobs being created. Commented Sep 6, 2017 at 19:51
  • 1
    Thanks. You need to get into the details of how node works. I'm not a JS developer, but I expect what's going on is that node is forking and starting some other processes, and then exiting. So it won't show up in your "jobs" list at all. Again, a shell scripting framework is almost invariably code smell. You have architectural problems here; you're trying to use the shell to keep track of internal workings of JS when it really can't do that. Commented Sep 6, 2017 at 20:12