NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/48875: possible ash backgrounding bug



>Number:         48875
>Category:       bin
>Synopsis:       possible ash backgrounding bug
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 05 16:20:00 +0000 2014
>Originator:     Edgar Fuß <ef%math.uni-bonn.de@localhost>
>Release:        NetBSD 6.1_STABLE
>Organization:
        Mathematisches Institut der Universität Bonn
>Environment:
Architecture: x86_64
Machine: amd64
>Description:
        When doing $() command substitution calling a background function,
        evaluation pauses until the backgrounded process finishes.
        This doesn't happen if the function body is expanded inside the 
substitution.
>How-To-Repeat:
        The first echo will finish imediately, the second only after three 
seconds:
        #!/bin/sh
        
        f() {
                sleep 3
        }
        
        echo $(sleep 3 >&- & echo $!)
        echo $(f >&- & echo $!)
>Fix:
        



Home | Main Index | Thread Index | Old Index