Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


g++ wait command

Posted on 1998-04-29
Medium Priority
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

What am I over looking.

Thanks in advance.
Bob Ross
Question by:bross073097
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3

Accepted Solution

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


Author Comment

ID: 1292557
Thanks, I was at wit's end with this.



Author Comment

ID: 1292558
I tried sleep(10);

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

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

What did I miss.

Bob Ross

Author Comment

ID: 1292559
I got it, I forgot to put the unistd.h #include



Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

650 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