On Mon, Jul 29, 2013 at 7:04 PM, Pierre Gaston <pierre.gas...@gmail.com> wrote: > On Mon, Jul 29, 2013 at 6:44 PM, Greg Wooledge <wool...@eeg.ccf.org> wrote: >> On Mon, Jul 29, 2013 at 06:36:58PM +0300, Pierre Gaston wrote: >>> it's not clear (like it is for, say, exit) what the relationship >>> between return and process is. >>> I guess most people expect it to not care about subshells and just >>> execute the statement after the function call. >> >> "Most people" barely know what a subshell is. > > Sure, but even If I know what it is, it's still not clear why return > would only exit the process > since it sounds something more related to the concept of "functions". > Well, it's clear if you think about what the parent shell knows. It only knows the exit status of the subshell and it cannot know if it exited because of a "return" or a "break" or "exit" or something else.
- Bug in function return statement in while subshell Roman Rakus
- Re: Bug in function return statement in while subshell Chris Down
- Re: Bug in function return statement in while subshell Chet Ramey
- Re: Bug in function return statement in while subsh... Pierre Gaston
- Re: Bug in function return statement in while s... Greg Wooledge
- Re: Bug in function return statement in whi... Pierre Gaston
- Re: Bug in function return statement i... Pierre Gaston
- Re: Bug in function return statement in while subsh... Roman Rakus
- Re: Bug in function return statement in while s... Pierre Gaston
- Re: Bug in function return statement in whi... Chris Down
- Re: Bug in function return statement i... Pierre Gaston
- Re: Bug in function return stateme... Chris Down
- Re: Bug in function return sta... Pierre Gaston
- Re: Bug in function return sta... Chris Down
- Re: Bug in function return sta... Greg Wooledge
- Re: Bug in function return statement in while s... Chet Ramey
- Re: Bug in function return statement in whi... Roman Rakus