DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 5th July 2008
mfaridi's Avatar
mfaridi mfaridi is offline
Spam Deminer
 
Join Date: May 2008
Location: Afghanistan
Posts: 320
Default Ctrl-D and Ctrl-C sometimes dose not work

I use FreeBSD* 7 and ZSH for SHELL , sometimes when I press Ctrl-D and Ctrl-C , these commands dose not work for example when I* use python and want exit python when I press Ctrl-D I can not exit it , or when I type

Code:
man rtorrent
when I press Ctrl-C I can not exit it.

why this is happen for me ???
Reply With Quote
  #2   (View Single Post)  
Old 5th July 2008
richardpl richardpl is offline
Spam Deminer
 
Join Date: May 2008
Location: Croatia
Posts: 284
Default

Programmers designed such applications to ignore ctrl-c, ie ctrl-c can do something completly different ....

And this is not directly related to zsh or to FreeBSD in any way.

Last edited by richardpl; 5th July 2008 at 09:49 AM.
Reply With Quote
  #3   (View Single Post)  
Old 5th July 2008
tuck's Avatar
tuck tuck is offline
Shell Scout
 
Join Date: May 2008
Posts: 99
Default

Quote:
Originally Posted by richardpl View Post
Programers designed such applications to ignore ctrl-c, ie ctrl-c can do something completly different ....

And this is not directly related to zsh or to FreeBSD in any way.
Every manpage should be possible to exit with ctrl+c. Doesn't depend on what different programmers ignore.
But I have no clue what's wrong.
Reply With Quote
  #4   (View Single Post)  
Old 5th July 2008
richardpl richardpl is offline
Spam Deminer
 
Join Date: May 2008
Location: Croatia
Posts: 284
Default

Quote:
Originally Posted by tuck
Every manpage should be possible to exit with ctrl+c. Doesn't depend on what different programmers ignore.
Wrong, by default, man pager viewer is GNU less - and guess what, GNU less ignore ctrl-c. You can configure your own xzy viewer if you like.
Quote:
Originally Posted by tuck
But I have no clue what's wrong.
too bad for you.
Reply With Quote
  #5   (View Single Post)  
Old 5th July 2008
mfaridi's Avatar
mfaridi mfaridi is offline
Spam Deminer
 
Join Date: May 2008
Location: Afghanistan
Posts: 320
Default

Quote:
Originally Posted by richardpl View Post
Programmers designed such applications to ignore ctrl-c, ie ctrl-c can do something completly different ....

And this is not directly related to zsh or to FreeBSD in any way.
But I do not have this problem before . in FreeBSD 6 or 6.5
Reply With Quote
  #6   (View Single Post)  
Old 5th July 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

I don't know about zsh, but with ksh I send a ^Z and then get the pid of the background processes like so:

Code:
$ top &         
[1] 7251
$ kill -KILL `echo $!`
kill -KILL `echo $!`
[1] + Killed               top
$
A little ugly bit it works... and according to this, zsh works the same way.
Reply With Quote
  #7   (View Single Post)  
Old 5th July 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

Quote:
Originally Posted by mfaridi View Post
But I do not have this problem before . in FreeBSD 6 or 6.5
Perhaps you chose the wrong keymap then, learn to clarify your questions..
Reply With Quote
  #8   (View Single Post)  
Old 5th July 2008
richardpl richardpl is offline
Spam Deminer
 
Join Date: May 2008
Location: Croatia
Posts: 284
Default

Quote:
Originally Posted by mfaridi View Post
But I do not have this problem before . in FreeBSD 6 or 6.5
what is output of following command:
# echo $PAGER
if it is not something with 'more' ctrl-c will not exit program.

That is just for man pages, for python and others I dont belive you that ctrl-c had ever worked differently.
Reply With Quote
  #9   (View Single Post)  
Old 6th July 2008
mfaridi's Avatar
mfaridi mfaridi is offline
Spam Deminer
 
Join Date: May 2008
Location: Afghanistan
Posts: 320
Default

Quote:
Originally Posted by richardpl View Post
what is output of following command:
# echo $PAGER
if it is not something with 'more' ctrl-c will not exit program.

That is just for man pages, for python and others I dont belive you that ctrl-c had ever worked differently.
when I type

Code:
echo $PAGER
I see this

Code:
Mostafa ~ [24] echo $PAGER                                                                                                               10:20
less
Mostafa ~ [25]
Reply With Quote
Old 6th July 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

From less(1):

Code:
       -K or --quit-on-intr
              Causes less to exit  immediately  when  an  interrupt  character
              (usually  ^C) is typed.  Normally, an interrupt character causes
              less to stop whatever it is doing  and  return  to  its  command
              prompt.   Note  that  use  of this option makes it impossible to
              return to the command prompt from the "F" command.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
T-Dose (Technical Dutch Open Source Event) 3-4 October 2009 - Eindhoven - Netherlands J65nko Off-Topic 2 2nd October 2009 05:38 PM
Disable CTRL+ALT+DEL FreeBSD Gnome mfaridi FreeBSD Security 7 27th August 2008 07:10 PM
disabling ctrl-c malindang FreeBSD General 3 27th June 2008 12:06 AM
please increase this time , nobody dose not lose new posts. mfaridi Feedback and Suggestions 4 26th May 2008 07:52 PM
Getting Qt4 to work on FreeBSD enpey FreeBSD Ports and Packages 6 6th May 2008 07:20 AM


All times are GMT. The time now is 11:00 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick