🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #560

1.03 bug in handling eval and .

#560
From: Robert Andersson
Date: Fri, 08 Sep 1989 17:17
29 lines
1498 bytes
This is release 1.03 running on an NCR Tower 32/400 running NCR's OS
release 2.01.00 (SYSV.2 compatible), and using NCR's C-compiler.

JOB_CONTROL is *not* defined when compiling bash, I don't know if that
makes a difference. I have also applied the patches I sent a couple of
days ago but I believe they are not relevant to this problem.

Recreate the bug by:
bash$ eval ls

or:
bash$ . some_shell_script

The symptom is that bash gives an error message stating that 
errno=No child processes

I believe this happens because of a bug in:
execute_cmd.c
  execute_command_internal()
    case cm_simple:
It calls wait_for if execute_simple_command() forked a child. The
problem is that execute_simple_command may call
execute_command_internal again recursively. The second call waits for
its child, but, and this is the bug, so does the first call. Thus the
second wait_for is called with the same pid as the first one and fails.

Robert Andersson, International Systems, Oslo, Norway
Internet:         ra@is.uu.no
UUCP:             ...!{uunet,mcvax,ifi}!is.uu.no!ra
Technical Details
Message-ID: <8909081617.AA12324@isncr.is.uu.no>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!shelby!apple!brutus.cs.uiuc.edu!tut.cis.ohio-state.edu!is.uu.no!ra

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!shelby!apple!brutus.cs.uiuc.edu!tut.cis.ohio-state.edu!is.uu.no!ra
From: ra@is.uu.no (Robert Andersson)
Newsgroups: gnu.bash.bug
Subject: 1.03 bug in handling eval and .
Message-ID: <8909081617.AA12324@isncr.is.uu.no>
Date: 8 Sep 89 17:17:01 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 29