I know that modern *nix OSes allow to open file so that data are not cached in system/disk writecache, so any write operation will finish only when data is phisically written to disk.
Could you suggest how can I do that in Perl?
OS is AIX/Solaris.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use the sysopen function with O_SYNC as one of the flags. Check in the system manpages for the supported flags (man 2 open). I know it’s there on Solaris 10, not sure about AIX. For example:
See http://perldoc.perl.org/functions/sysopen.html for more information.