darcs patch: XMonad.Core: make spawn smarter

Thu Aug 14 18:42:17 EDT 2008 gwern0@gmail.com * XMonad.Core: make spawn smarter Have spawn examine $SHELL if it exists. $SHELL is the user's preferred shell, and may do many things the user wants but the default /bin/sh does not.

On 2008 Sep 21, at 0:24, gwern0@gmail.com wrote:
- -spawn x = doubleFork $ executeFile "/bin/sh" False ["-c", x] Nothing +spawn x = io $ do shell <- getEnv "$SHELL" `catch` (\_ -> return "/ bin/sh") + doubleFork $ executeFile shell False ["-c", x] Nothing
As seen by getEnv, it's just "SHELL". This code looks for $SHELL, which most shells other than rc will balk at creating. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH

On 2008.09.21 00:32:06 -0400, "Brandon S. Allbery KF8NH"
On 2008 Sep 21, at 0:24, gwern0@gmail.com wrote:
- -spawn x = doubleFork $ executeFile "/bin/sh" False ["-c", x] Nothing +spawn x = io $ do shell <- getEnv "$SHELL" `catch` (\_ -> return "/bin/sh") + doubleFork $ executeFile shell False ["-c", x] Nothing
As seen by getEnv, it's just "SHELL". This code looks for $SHELL, which most shells other than rc will balk at creating. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com
Oh, d'oh! I knew that... I shall amend-record that forthwith. -- gwern Flintlock Hamas RIT Abdurahmon BECCA EG
participants (3)
-
Brandon S. Allbery KF8NH
-
Gwern Branwen
-
gwern0@gmail.com