bug-bash
[Top][All Lists]
Advanced

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

Job control bug wrt. command substitution


From: Andreas Schwab
Subject: Job control bug wrt. command substitution
Date: Wed, 4 Oct 2000 10:24:01 +0200

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' 
-DCONF_OSTYPE='linux' -DCONF_MACHTYPE='i386-suse-linux' -DCONF_VENDOR='suse' 
-DSHELL -DHAVE_CONFIG_H  -D_FILE_OFFSET_BITS=64  -I. -I/usr/include -I. 
-I./include -I./lib -I/usr/include -O2 -m486 -D_GNU_SOURCE -Wall -pipe
uname output: Linux hawking 2.2.16 #1 Wed Aug 2 20:22:26 GMT 2000 i686 unknown
Machine Type: i386-suse-linux

Bash Version: 2.04
Patch Level: 0
Release Status: release

Description:
        A simple command running in a command substitution does not have
        the correct process group if the command substitution is a
        parameter of a command on the left side of a pipeline.

Repeat-By:
        # This is correct
        $ echo "`ps jft 8`"
         PPID   PID  PGID   SID TTY      TPGID STAT   UID   TIME COMMAND
         9386  9387  9387  9387 pts/8     9387 S      597   0:00 -bash
         9387 12761  9387  9387 pts/8     9387 R      597   0:00 ps jft 8
        # This is wrong
        $ echo "`ps jft 8`" | cat
         PPID   PID  PGID   SID TTY      TPGID STAT   UID   TIME COMMAND
         9386  9387  9387  9387 pts/8    12769 S      597   0:00 -bash
         9387 12769 12769  9387 pts/8    12769 S      597   0:00 -bash
        12769 12771  9387  9387 pts/8    12769 R      597   0:00  \_ ps jft 8
         9387 12770 12769  9387 pts/8    12769 S      597   0:00 cat
        # This is correct(?)
        $ echo "`ps jft 8; echo`" | cat
         PPID   PID  PGID   SID TTY      TPGID STAT   UID   TIME COMMAND
         9386  9387  9387  9387 pts/8    12794 S      597   0:00 -bash
         9387 12794 12794  9387 pts/8    12794 S      597   0:00 -bash
        12794 12796  9387  9387 pts/8    12794 S      597   0:00  \_ -bash
        12796 12797 12794  9387 pts/8    12794 R      597   0:00      \_ ps jft 
8
         9387 12795 12794  9387 pts/8    12794 S      597   0:00 cat
        # This is the problem
        $ echo "`cat`" | cat
        cat: -: Input/output error




reply via email to

[Prev in Thread] Current Thread [Next in Thread]