Home:ALL Converter>Ctrl C does not kill foreground process in Unix

Ctrl C does not kill foreground process in Unix

Ask Time:2014-02-17T19:25:55         Author:Ravi

Json Formatter

I have the following code written in a script anmed test.csh to start a GUI based application in foreground in Solaris Unix. When I run the script and want to kill the GUI process using Keyboard Ctrl + C, the process is not getting terminated. If I open the GUI application directly from the terminal, I am able to kill the process using Ctrl + C. Can someone help me understand why am I not able to kill the process invoked from a script?

#! /usr/bin/csh
# some  script to set env variables
# GUI Process
cast

Then I execute the script using the following command. I am not able to terminate the vcast process using Ctrl + C command.

 source test.csh

Author:Ravi,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/21827791/ctrl-c-does-not-kill-foreground-process-in-unix
BillyBigPotatoes :

If it is being launched into its own thread then the hangup request may not get to the application. You could add a signal handler to cascade the hangup request or look at the process table to see what the process id is for the app and then kill it. This could also be scripted very easily.",
2014-02-17T11:30:52
yy