Mailing List Archive

Support open source code!


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

Re: tlug: perl daemons keeping me up past my bed time....



>>>>> "Frank" == Frank Bennett <bennett@example.com> writes:

    Frank> I take that back.  It DOES work.  I was having buffering
    Frank> problems because I didn't know what I was doing; I had
    Frank> three separate processes trying to write to the screen
    Frank> (fifo, tar vcfz and tar vtfz).

    Frank> Here's a test that will actually work:

    Frank> [bennett@example.com bennett]$ mkfifo WOW.tar.gz [bennett@example.com
    Frank> bennett]$ tar cfz WOW.tar.gz .gimp & [bennett@example.com
    Frank> bennett]$ tar vtfz WOW.tar.gz

    Frank> Essentially the same thing you were trying to do before,
    Frank> but via the shell instead of Perl.

After much reading about process groups, forking, daemons etc, I
finally got it to work. It turns out that after forking to become a
daemon, I was not closing STDIN, STDOUT, and STDERR. Once I did that,
the script works fine in back quotes.

Its only 145 line, so if anyone wants it I can post it or send it
directly...

Andy
------------------------------------------------------------------
Next Technical Meeting: 12 December, 12:30 at Temple Univ. Japan
*NEW LOCATION* a map is available at http://www.tuj.ac.jp/maps.html
Next Nomikai: 15 January 1999, 19:30 Tengu TokyoEkiMae 03-3275-3691
------------------------------------------------------------------
more info: http://tlug.linux.or.jp                     Sponsor: PHT


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links