Newsgroups: gnu.bash.bug Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!usenet.ins.cwru.edu!cwns1!chet From: chet@cwns1.CWRU.EDU (Chet Ramey) Subject: Re: Stuff running in subshells can be annoying Message-ID: <1990Jan11.165946.21979@usenet.ins.cwru.edu> Organization: Case Western Reserve Univ. Cleveland, Ohio, (USA) References: <1990Jan10.191651.6471@usenet.ins.cwru.edu> Date: Thu, 11 Jan 90 16:59:46 GMT In article andrewt@watnow.waterloo.edu (Andrew Thomas) writes: >But this doesn't really answer the question. Will it ever be possible >for me to do > exec $(jobs | fgprg 'emacs -nw') >while still having the shell perform correctly in other cases? Would >it require treating jobs separately from other builtins? OK, I'll try it again. No, I don't think it will ever be possible for you to do that, for two reasons: 1. Subshells don't have job control, so the `jobs' builtin returns nothing 2. Subshells don't have jobs, for the reasons I stated before, so `jobs' wouldn't return anything if job control was on. I think it would be too messy to make this work for just the `jobs' builtin, the way the code in execute_cmd.c is structured. It would require treating the `jobs' builtin separately from everything else. Chet Ramey -- Chet Ramey Network Services Group "Help! Help! I'm being Case Western Reserve University repressed!" chet@ins.CWRU.Edu