[Cialug] Bash 4.1 question

Dave Weis djweis at internetsolver.com
Thu Sep 8 17:23:53 CDT 2011


Perhaps stty would let you change the behavior...

Dave



-----Original Message-----
From: cialug-bounces at cialug.org [mailto:cialug-bounces at cialug.org] On Behalf Of Todd Walton
Sent: Thursday, September 08, 2011 5:20 PM
To: Central Iowa Linux Users Group
Subject: Re: [Cialug] Bash 4.1 question

On Thu, Sep 8, 2011 at 3:42 PM, Daniel A. Ramaley
<daniel.ramaley at drake.edu> wrote:
> On one of my machines, when i type ctrl-c bash prints "^C" and then
> starts a fresh command prompt on the next line. On other machines
> (including SSH sessions), it doesn't print the "^C"... it just starts a
> new prompt on the next line.

Line 2532 of the jobs.c source says:

/* If job control is enabled, the job was started with job
control, the job was the foreground job, and it was killed
by SIGINT, then print a newline to compensate for the kernel
printing the ^C without a trailing newline. */
if (job_control && IS_JOBCONTROL (job) && IS_FOREGROUND (job) &&
WIFSIGNALED (s) && WTERMSIG (s) == SIGINT)

Perhaps it's the kernel that prints it.

--
Todd
_______________________________________________
Cialug mailing list
Cialug at cialug.org
http://cialug.org/mailman/listinfo/cialug


More information about the Cialug mailing list