[Top][All Lists]

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

Python and Bash

From: Andrew Kezys
Subject: Python and Bash
Date: Wed, 19 Jul 2006 13:16:55 -0400

Not exactly a bug, perse. An oddity, however.

I am writing some code in bash that will execute a python script, and
carry on with some user input. Obivously, I called the python command
through something like ( python test.py test.txt ) in order for it to
be a process. However, this test.py program takes data from the serial
port and saves it to a file.

So, when I'm running the shell script that calls on this python script
and end it with ctrl-c, it only ends the shell script, and not the
python script, which continues putting serial data to a file. Now, if
I kill the python script with a killall command that is within the
shell script, the output file for the serial ends up being empty.

Is there any command that will kill bash script-assosciated processes
in a kind way (ie ctrl-c) when the overall script is ended?

- A

reply via email to

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