Thread: pipe not working

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    28

    pipe not working

    i was wondering if anyone could give me a hint as to what i'm doing wrong...

    program takes in a two commands and pipes them using the || instead of the standard unix pipe ( | ).

    it runs the pipe fine...prints the results, but then exits out of the shell.

    ie. myshell> cat myfile || sort

    kicks back into bash instead of giving my myshell> prompt after printing the result..

    code is attached.

    thanks again for any help

    Alien_Freak
    curiousity killed the cat, but it
    makes for one hell of a programmer.

    Alien.

  2. #2
    Registered User
    Join Date
    Mar 2002
    Posts
    28

    fixing created another issue

    ok, i took ur advice, now it doesn't abend abnormally...

    it doesn't print the output for the sort.

    ie. myshell> cat myfile || sort

    until after i exit from the parent

    new version of altered code attached.

    altered code is lines 67-80.


    thanks for the help vVv
    curiousity killed the cat, but it
    makes for one hell of a programmer.

    Alien.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Named pipe problem
    By rahul_c in forum C Programming
    Replies: 3
    Last Post: 10-02-2007, 05:40 PM
  2. Pipe(): Interprocess or Intraprocess comm?
    By @nthony in forum C Programming
    Replies: 2
    Last Post: 03-28-2007, 07:27 PM
  3. Clearing a pipe used in IPC
    By cbgb in forum C Programming
    Replies: 5
    Last Post: 09-26-2006, 03:59 PM
  4. Pipe problem, popen(), pipe().
    By apacz in forum C Programming
    Replies: 7
    Last Post: 06-08-2006, 12:55 AM
  5. how do i compile pipe() API on windows ?
    By intruder in forum C++ Programming
    Replies: 2
    Last Post: 01-04-2006, 06:39 PM