LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 02-26-2008, 07:38 AM   #1
cryincold
Member
 
Registered: Sep 2007
Location: Zhuhai, China
Distribution: Debian, etch
Posts: 40

Rep: Reputation: 15
Question Why program received SIGQUIT quited but did NOT generate the core file ????


The Advance Programming in Univ Environment book said programs received SIGQUIT default to terminate and generate a core file.

I coded a simple program with only one line code: sleep(20);

Then i ran the program.
$ ./test

Program was waiting there for 20 seconds, so I typed the terminal quit key(Control-backslash).

The program terminated as expected.
But there's no CORE FILE generated on the current directory ?

why did this happened?

Any helps would be greatly appreciated.

Tku IA.

Last edited by cryincold; 02-26-2008 at 07:40 AM. Reason: Grammar Error
 
Old 02-26-2008, 10:21 AM   #2
rstewart
Member
 
Registered: Feb 2005
Location: Sunnyvale, CA
Distribution: Ubuntu
Posts: 205

Rep: Reputation: 38
Hello,

It could be that you core file size limit value is set to 0. Do a "ulimit -a" and see what the core file size reports. If zero, then do a "ulimit -c unlimited" to disable core limits for that shell. NOTE: If you are running multiple windows/multiple shells you must reset the ulimit values for each shell, or you could put the ulimit command into your local .rc file to have it automatically executed every time you create a new window.

Ciao!
 
Old 02-27-2008, 04:26 AM   #3
cryincold
Member
 
Registered: Sep 2007
Location: Zhuhai, China
Distribution: Debian, etch
Posts: 40

Original Poster
Rep: Reputation: 15
Tku, rstewart

The problem is exactly as u said.

^_^

Tku
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Generate random numbers in C program ssaslam Linux - Newbie 5 10-23-2008 08:28 PM
Generate random numbers in C program ssaslam Linux - Newbie 1 02-21-2008 11:39 PM
Any program to generate project statistics? ssobeht Programming 3 03-31-2005 06:42 AM
i make a program using forte how can i generate from that program an rpm abdelhlims Programming 0 07-13-2004 12:10 PM
about the SIGQUIT dummyagain Programming 11 10-05-2003 02:19 AM


All times are GMT -5. The time now is 05:17 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration