Unix questions - Is the following the best way to implement loop : while (1) { call1 (); call2 ();call

This is Interesting: Free IT Magazines  
Home > Archive > Unix questions > September 2005 > Is the following the best way to implement loop : while (1) { call1 (); call2 ();call





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Is the following the best way to implement loop : while (1) { call1 (); call2 ();call
clusardi2k@aol.com

2005-09-15, 6:05 pm

Hello,

I have code that I want to run almost forever. Is the following
code segment good, bad, or ugly?

int main ()
{
while ( 1 )
{
call1 ();
call2 ();
call3 ();
}

return (0);
}

Note : If I use -Wall option I get warnings about : the while (1)
and the return is never reached.

Also, sometimes a core is dumped when I control backslash out of it.

Thanks,
Christopher Lusardi

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com