How to wab for all chilren *processes* to return?

Discussion in 'C Programming' started by loudking, May 17, 2007.

  1. loudking

    loudking Guest

    Question : write a program which creates 5 processes (in addition to
    itself). One of these processes must display 1, another must display 2
    .... the last one displays 5. The parent process waits until all other
    processes are finished, then returned.
     
    loudking, May 17, 2007
    #1
    1. Advertising

  2. loudking

    Tor Rustad Guest

    loudking wrote:
    > Question : write a program which creates 5 processes (in addition to
    > itself). One of these processes must display 1, another must display 2
    > ... the last one displays 5. The parent process waits until all other
    > processes are finished, then returned.


    Howto contact your teacher?

    --
    Tor
     
    Tor Rustad, May 17, 2007
    #2
    1. Advertising

  3. loudking

    Guest

    On May 17, 3:18 pm, loudking <> wrote:
    > Question : write a program which creates 5 processes (in addition to
    > itself). One of these processes must display 1, another must display 2
    > ... the last one displays 5. The parent process waits until all other
    > processes are finished, then returned.


    However often you ask this, it still won't be on topic here.
     
    , May 17, 2007
    #3
  4. loudking

    Army1987 Guest

    "loudking" <> ha scritto nel messaggio
    news:...
    > Question : write a program which creates 5 processes (in addition to
    > itself). One of these processes must display 1, another must display 2
    > ... the last one displays 5. The parent process waits until all other
    > processes are finished, then returned.


    The thing closest to a portable C way to do that, is displaying argv[1][0]
    and flushing stdout if argv[1] is not NULL, and writing some code to copy
    argv[0] to a string, append " 1" to it, pass it to system() etc. if argv[1]
    is NULL.
    But nothing in the Standard requires this to work. The behaviour of system()
    and the exact contents of argv[0] are implementation defined.
     
    Army1987, May 18, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. AA

    VC and WAB integration.

    AA, Jan 21, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    497
  2. Replies:
    5
    Views:
    2,667
    Sebastian Wain
    Jan 11, 2006
  3. Jeff Rodriguez
    Replies:
    23
    Views:
    1,182
    David Schwartz
    Dec 9, 2003
  4. =?utf-8?B?6Km55YWJ6ICA?=

    Read from Windows Address Book (.wab file format) ?

    =?utf-8?B?6Km55YWJ6ICA?=, May 12, 2007, in forum: Python
    Replies:
    2
    Views:
    3,340
    =?utf-8?B?6Km55YWJ6ICA?=
    May 13, 2007
  5. loudking
    Replies:
    1
    Views:
    264
    Eric Sosman
    May 17, 2007
Loading...

Share This Page