I need to find the most portable way..

This is a discussion on I need to find the most portable way.. within the C Programming forums, part of the General Programming Boards category; of launching apps inside of another app and feeding input and receiving output in realtime, that works. there is no ...

  1. #1
    ggs
    ggs is offline
    C > C++ duders ggs's Avatar
    Join Date
    Aug 2001
    Posts
    435

    I need to find the most portable way..

    of launching apps inside of another app and feeding input and receiving output in realtime, that works.

    there is no fork in windows systems.
    popen only allows either read, or write, not both.

    what should I do?

    (no links to pipe, please. that goes with fork)
    .sect signature

  2. #2
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,267
    >there is no fork in windows systems.
    >(no links to pipe, please. that goes with fork)

    there are pipes on windows systems...

  3. #3
    ggs
    ggs is offline
    C > C++ duders ggs's Avatar
    Join Date
    Aug 2001
    Posts
    435
    ....

    that, is all.

    in the console, you'll find that the first task in a pipe won't send it's output to the second task until it is complete.

    there is no fork in windows, and pipe() is basically useless without fork.
    .sect signature

  4. #4
    Registered User Esss's Avatar
    Join Date
    Aug 2001
    Posts
    133
    Save perhaps battling with Cygwin (something I advise avoiding at all costs) or, worse, 'system', there is no portable way of launching another program. Use #ifdefs.

    As for bidirectional pipes, you could use sockets. I still recommend sticking with OS-specific things, but sockets (and files) are the only portable IPC mechanism.
    Ess
    Like a rat in a maze who says,
    "Watch me choose my own direction"
    Are you under the illusion
    The path is winding your way?
    - Rush

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem building Quake source
    By Silvercord in forum Game Programming
    Replies: 16
    Last Post: 07-11-2010, 09:13 AM
  2. How to find O of threads ?
    By jabka in forum C Programming
    Replies: 3
    Last Post: 03-11-2008, 12:25 PM
  3. ld.exe: cannot find -l-lstdc++
    By Tonto in forum Tech Board
    Replies: 3
    Last Post: 04-10-2007, 11:20 PM
  4. how do u find 2nd largest number??
    By juancardenas in forum C Programming
    Replies: 8
    Last Post: 02-14-2003, 07:28 AM
  5. Q: Recursion to find all paths of a maze
    By reti in forum C Programming
    Replies: 7
    Last Post: 11-26-2002, 08:28 AM

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