Re: bash

From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 03/30/05


Date: Wed, 30 Mar 2005 08:30:26 -0500

In article <3avdg2F6eldjnU1@news.dfncis.de>,
 Reiner Funck <reiner.funck@dwd.de> wrote:

> What happens with:
>
> echo $$; ( a.out; )
>
> 8093
> 27780 8093
>
> one subshell "fails", why?
>
> I have not found anything in man page.
>
> Many thanks for help, Reiner

The last command in a shell process can be executed using exec() rather
than fork() followed by exec(), since the exit status of a shell is
simply the exit status of its last command.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


Relevant Pages

  • Re: Get exit status, STDOUT and STDERR of a command
    ... I need some way to run a OS command and get ... I could get STDOUT And STDERR, but how to get exit status. ... The child execs the command to be piped to/from. ... -- you may not have found out the exec() failed by the ...
    (perl.beginners)
  • Re: dd command & reading in background
    ... ^ D,"UnixReview: Shell Corner: The dspl Korn Shell ... user input timeout, do a search on C.U.S. for the ... # 0<c<127 - job exited with this exit code ...
    (comp.unix.shell)
  • Re: wScript.Shell Problems
    ... the completion of the underlying process. ... However, the Exec procedure is ... Here is why i went to the RUN command, it is my understanding that the ... EXEC command does not allow for the BOOLEAN indicating wether the ...
    (microsoft.public.scripting.vbscript)
  • Re: Problem in calling c programs and compiling them in tcl/tk
    ... Are you using Tcl's glob command to do this? ... using exec gcc filename.c and later exec ./a.out filename.c. ... the execution of a command that might generate a Tcl error. ... i can call a c program and compile it? ...
    (comp.lang.tcl)
  • Re: xp_cmdshell default path (system32) problem
    ... exec xp_cmdshell @cmd1 ... - specify the full path in the del command ... ensure that xp_cmdshell ALWAYS executes under the security context of ... I haven't executed the actual erase statements yet but rather have been ...
    (microsoft.public.sqlserver.programming)