bug-bash
[Top][All Lists]
Advanced

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

[50 character or so descriptive subject here (for reference)]


From: diamond
Subject: [50 character or so descriptive subject here (for reference)]
Date: Fri, 31 Aug 2001 16:07:08 +0100 (IST)

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H  -D_FILE_OFFSET_BITS=64  -I. 
-I/usr/include -I/home/swt/doko/export/packages/bash/bash-2.05 
-I/home/swt/doko/export/packages/bash/bash-2.05/include 
-I/home/swt/doko/export/packages/bash/bash-2.05/lib -I/usr/include -g -O2
uname output: Linux skynet 2.2.19 #1 Mon Apr 2 12:54:55 IST 2001 i686 unknown
Machine Type: i386-pc-linux-gnu

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

Description:
        A python script which is started from .bash_profile in the background
        is killed by ctrl-c on the command line. The same however has no effect
        on a perl script. I've tried this on bash 1.14.7, and it behaved as
        expected - bg jobs are unaffected by a ctrl-c. Also, this does not 
happen
        if the script is started manually in the background.

Repeat-By:
        diamond@skynet:~> jobs
        [1]+ 18823 Running                 ./test.py &
        diamond@skynet:~> fg
        bash: fg: job %1 started without job control
-->     diamond@skynet:~> Caught ctrl-c - exiting...

        [1]+  Done                    ./test.py
        diamond@skynet:~> jobs
        diamond@skynet:~>
        diamond@skynet:~> cat test.py
        #!/usr/bin/python

        import time

        try:
                while 1:
                        time.sleep(2)
        except KeyboardInterrupt:
                print "Caught ctrl-c - exiting..."
        diamond@skynet:~>

        --> indicated the place where ctrl-c was pressed. The fg command
        is just to illustrate the the job was started from .bash_profile.

Steve



reply via email to

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