[Perl-unix-users] Re: Flushing all open file descriptors...

2005-08-26 Thread Arijit Das
--- $Bill Luebkert <[EMAIL PROTECTED]> wrote: > Arijit Das wrote: > > > I think you are missing out here... > > Let's hope not. > > > DIsk files are always fully-buffered, STOUT is > line > > buffered and STDERR is unbuffered. > > Not true on all systems - buffering varies on > different tar

[Perl-unix-users] Re: Flushing all open file descriptors...

2005-08-26 Thread $Bill Luebkert
Arijit Das wrote: > I think you are missing out here... Let's hope not. > DIsk files are always fully-buffered, STOUT is line > buffered and STDERR is unbuffered. Not true on all systems - buffering varies on different target devices, system calls and OS's. UNIX 'write (2)' to a disk file is n

[Perl-unix-users] Re: Flushing all open file descriptors...

2005-08-26 Thread Arijit Das
I think you are missing out here... DIsk files are always fully-buffered, STOUT is line buffered and STDERR is unbuffered. My problem is I have to do a kill -9 at the end. And a process dying with kill -9 doesn't get a scope to do its cleanup like flushing open files handles and closing them. -A

[Perl-unix-users] Re: Flushing all open file descriptors...

2005-08-25 Thread Arijit Das
For me to use this, I will have to explicitly specify/SELECT all the file handles and then execute $| =1; which is something i don't want...cos my pgm is huge and finding out open file handles from each corner of it is cumbersome... So, I am looking for a func/cmd which flushes all the open files

[Perl-unix-users] Re: Flushing all open file descriptors...

2005-08-25 Thread $Bill Luebkert
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 d