Arijit Das wrote: > Is there a Perl func which, when executed, ensures that all the open > file descriptors of the corresponding process are flushed immediately? > > What I am looking for is this... > > #!/usr/bin/perl > .... > .... > # Open lots of files here and write some data to them but do not flush > any of them...
I'm pretty sure disk files are always written immediately (unlike buffered terminal files), but I could be wrong. If I'm right, it would only work for tty output. For sockets, I think they're also unbuffered and would be output as soon as possible. You could easily test it by opening your files and going to another terminal window and check the content of the files while your main code is in a long sleep loop. > .... > a_func_that_flushes_all_open_files(); > > kill -9, getpgrp(); -- ,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED] (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (My Perl/Lakers stuff) _______________________________________________ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs