bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fifo Problem


From: Bruce M Beach
Subject: Re: Fifo Problem
Date: Sat, 6 Jul 2002 21:31:32 +0000 (UTC)

On Wed, 3 Jul 2002, Chet Ramey wrote:
> I suspect that `application' now exits, because it gets EOF from its
> standard input.  When the last writer to a FIFO closes the file
> descriptor, subsequent reads return EOF......

   Okay, this is clear. I wrote up a perl script, so I know
   that the pipes can be connected. I also had to change a few
   lines of code in the application to make it work. (ftp, surrounded
   by a script). Now I'm not sure about opening the file descriptors
   in bash. If I do the following

create_pipes() {
     echo "create 4> pipe out"
       ftp_pipe_out=/tmp/ftp_pipe_out.$$ #create the output fifos
       mkfifo $ftp_pipe_out
       exec 4>$ftp_pipe_out  <-----------
     echo "leaving create 4> pipe out"
}
     It never leaves create_pipes. It get stuck on the exec. Whereas
     if I comment out
         # mkfifo $ftp_pipe_out
     or instead:
           touch $ftp_pipe_out
     it is will leave "create_pipes", but this just creates
     an ordinary file that never gets emptied by "ftp".
     Likewise for "pipe in".

     Bruce







reply via email to

[Prev in Thread] Current Thread [Next in Thread]