Thread: spawnl()

  1. #1
    Registered User
    Join Date
    Oct 2002


    I have been using the spawnl() function to run an external EXE but have a problem. I can get spawnl() to work just fine the only problem is that I don't want the program output printed on the console screen. I want it saved in a text file so that I can read and manipulate it. I did the first thing that came to mind:

    FILE<<spawnl(P_WAIT, "grab.exe", "grab.exe -args", NULL);

    But that of course just sends a '0' to the text file indicating that spawnl() was successful.

    Any suggestions? Thanks.

  2. #2
    Registered User moi's Avatar
    Join Date
    Jul 2002
    use a pipe, look up the refrence on the popen() function
    hello, internet!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problems with spawnl()
    By Mr.Modem in forum C Programming
    Replies: 11
    Last Post: 02-11-2006, 08:37 AM
  2. using spawnl for a dos program
    By ronin in forum C Programming
    Replies: 6
    Last Post: 06-30-2002, 09:34 PM
  3. spawnl !!!
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 06-05-2002, 06:00 PM
  4. about spawnl
    By xacoolboy in forum C Programming
    Replies: 1
    Last Post: 05-13-2002, 09:01 AM
  5. spawnl and char *
    By lsegundo in forum C Programming
    Replies: 9
    Last Post: 02-26-2002, 05:01 PM