spawnl()

This is a discussion on spawnl() within the C++ Programming forums, part of the General Programming Boards category; I have been using the spawnl() function to run an external EXE but have a problem. I can get spawnl() ...

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    3

    spawnl()

    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
    moi
    moi is offline
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    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, 10:34 PM
  3. spawnl !!!
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 06-05-2002, 07:00 PM
  4. about spawnl
    By xacoolboy in forum C Programming
    Replies: 1
    Last Post: 05-13-2002, 10:01 AM
  5. spawnl and char *
    By lsegundo in forum C Programming
    Replies: 9
    Last Post: 02-26-2002, 05:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21