Opened 9 years ago

#341 new defect

ash: process stuck in read()

Reported by: Yuri Dario Owned by:
Priority: normal Milestone: new
Component: baselayout Version:
Severity: normal Keywords:
Cc:

Description

Sometimes ash waits forever and script does not end. Attaching a debugger showed that it is waiting for read() to return something. I think this is due to a parent/child fork and improperly closed stdin/out.

nr = read(parsefile->fd, buf, BUFSIZ - 8);

parsefile->fd is zero. This happens also with a ash built using source code from trunk (and with the old 2006 binary).

 Function    | Part             | Source        | Module               
-------------+------------------+---------------+----------------------
 0x1FFC2536  | doscall1.dll:2   |               | doscall1.dll:2:9526  
 0x1E7451E3  | libc066.dll:1    |               | libc066.dll:1:217571 
 0x1E768398  | libc066.dll:1    |               | libc066.dll:1:361368 
 0x1E768222  | libc066.dll:1    |               | libc066.dll:1:360994 
 preadfd     | INPUT.C          | INPUT.C(206)  | sh.exe:1:36721       
 preadbuffer | INPUT.C          | INPUT.C(259)  | sh.exe:1:37030       
 xxreadtoken | PARSER.C         | PARSER.C(809) | sh.exe:1:67662       
 readtoken   | PARSER.C         | PARSER.C(724) | sh.exe:1:67230       
 parsecmd    | PARSER.C         | PARSER.C(139) | sh.exe:1:63013       
 cmdloop     | MAIN.C           | MAIN.C(251)   | sh.exe:1:51653       
 main        | MAIN.C           | MAIN.C(216)   | sh.exe:1:51485       
 __text      | {STANDARD INPUT} | CRT0.S(89)    | sh.exe:1:34          
 0x1E738876  | libc066.dll:1    |               | libc066.dll:1:166006 

Change History (0)

Note: See TracTickets for help on using tickets.