Solved

g++ wait command

Posted on 1998-04-29
4
765 Views
Last Modified: 2013-12-26
I have wrote a while loop that reads one line at a time and sends an email to the user. I was using strcpy & strcat to move in to memory and then system(buffer) to run it. Locked up the server because it was too much all at once. I have been tring to figure out how to put a wait(seconds) command between each while loop.

I tried
wait(2);
pause(2);

What am I over looking.

Thanks in advance.
Bob Ross
0
Comment
Question by:bross073097
  • 3
4 Comments
 
LVL 2

Accepted Solution

by:
jaked earned 50 total points
Comment Utility
You want sleep(seconds). wait() waits for a child process to die, and pause() pauses until a signal is received.

0
 

Author Comment

by:bross073097
Comment Utility
Thanks, I was at wit's end with this.

Bob

0
 

Author Comment

by:bross073097
Comment Utility
I tried sleep(10);

When I compiled it g++ test.c I received

implicit declaration of function 'int sleep(...)'

What did I miss.

Thanks
Bob Ross
0
 

Author Comment

by:bross073097
Comment Utility
I got it, I forgot to put the unistd.h #include

Thanks

0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video discusses moving either the default database or any database to a new volume.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now