LinuxQuestions.org
Help answer threads with 0 replies.
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, 08: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 08:40 AM. Reason: Grammar Error
 
Old 02-26-2008, 11: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, 05: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 09:28 PM
Generate random numbers in C program ssaslam Linux - Newbie 1 02-22-2008 12:39 AM
Any program to generate project statistics? ssobeht Programming 3 03-31-2005 07:42 AM
i make a program using forte how can i generate from that program an rpm abdelhlims Programming 0 07-13-2004 01:10 PM
about the SIGQUIT dummyagain Programming 11 10-05-2003 03:19 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration