Thread: popen with app that never returns

  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    62

    popen with app that never returns

    I'm wanting to get the output from an application that never returns

    xscreensaver-command -watch

    I'm basically wanting my application to sleep for x amount of time if it discovers that the screensaver has kicked in. I'm just curious what effect it might have trying to read the output of an application that never returns and how I would capture its output at various intervals.

    Thanks

  2. #2
    Registered Luser cwr's Avatar
    Join Date
    Jul 2005
    Location
    Sydney, Australia
    Posts
    869
    This more appropriately belongs in the misnamed "Linux programming" forum.

    It should be okay to use popen for this. To get the output, you might do a select or poll to see if there's data available for reading on the descriptor.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. non-MFC DLL with MFC app question.
    By Kempelen in forum Windows Programming
    Replies: 10
    Last Post: 08-20-2008, 07:11 AM
  2. Polynomials and ADT's
    By Emeighty in forum C++ Programming
    Replies: 20
    Last Post: 08-19-2008, 08:32 AM
  3. best program to start
    By gooddevil in forum Networking/Device Communication
    Replies: 4
    Last Post: 05-28-2004, 05:56 PM
  4. pasword app
    By GanglyLamb in forum C Programming
    Replies: 2
    Last Post: 06-07-2003, 10:28 AM
  5. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM