]> Sergey Matveev's repositories - public-inbox.git/commitdiff
doc/txt2pre: flush output before utime()
authorEric Wong <e@80x24.org>
Wed, 1 Jan 2020 09:57:53 +0000 (09:57 +0000)
committerEric Wong <e@80x24.org>
Thu, 2 Jan 2020 02:15:51 +0000 (02:15 +0000)
Otherwise our utime() change is overridden when the flush
happens at exit.

Documentation/txt2pre

index 7cab0fa259ead40462c19599a6404ee5b3ed0463..cb6a76138131a8d0abd3593d013860d523b1f1fa 100755 (executable)
@@ -22,6 +22,7 @@ print '<html><head>',
   qq(<meta\nhttp-equiv="Content-Type"\ncontent="text/html; charset=utf-8"\n/>),
   "<title>$title</title>",
   "</head><body><pre>",  $str , '</pre></body></html>';
+STDOUT->flush;
 
 # keep mtime on website consistent so clients can cache
 if (-f STDIN && -f STDOUT) {