[Ilugc] C pgm - Recursive -segmentation fault

  • From: Kannan_Ranganathan@xxxxxxxxxx (Kannan_Ranganathan)
  • Date: Tue Sep 14 10:33:44 2004

 
Nothing specific ..neither do I want to write a daemon program now.

The whole issue started since someone mentioned that his recursive program
was stopping after sometime (after 52K iterations). The solution  given was
stack overflow.

I ran the same program and it seems to be running well over 12 hr...That's
why I asked how come the difference.

If its stack overflow....why is it not overflowing in my machine ??? (p2 64
MB RAM). I just complied as it is(gcc -o test test.c)

Regards 
Kannan 






-----Original Message-----
From: Gopalarathnam V. [mailto:gopalarathnam_v@xxxxxxxxx] ;
Sent: Tuesday, September 14, 2004 10:22 AM
To: Kannan_Ranganathan
Cc: Chennai LUG
Subject: RE: [Ilugc] C pgm - Recursive -segmentation fault

My question is why would you want to write such a program which does an
infinite recursive looping.

If your intention is to write a daemon program, it is much more complex
-- you need to detach from the terminal and ignore certain signals, etc.
You can get the skeleton daemon program either from Advanced UNIX
Programming Environment or by digging the web.

On Tue, 2004-09-14 at 10:12, Kannan_Ranganathan wrote:

This program is still running well above 12 hrs (running since last 
night till I left for office this morning  ) ... My machine is a P2 /64 MB
ram.

I am sure it would have run more than 52K times ...Any clues what's 
happening here ??? No segmentation fault nothing .
Don't exactly remember gcc version..

Regards
Kannan

--
Gopalarathnam V.

************************************************************************** 
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**************************************************************************

Other related posts: