aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/ChangeLog5
-rw-r--r--doc/gawk.info173
-rw-r--r--doc/gawk.texi5
-rw-r--r--doc/gawktexi.in5
-rw-r--r--extension/ChangeLog5
-rw-r--r--extension/readdir.3am12
6 files changed, 120 insertions, 85 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 56154876..8671f180 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,8 @@
+2019-11-03 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexi.in: Document that readdir extension can cause a
+ fatal error, which should be handled with BEGINFILE.
+
2019-10-16 Arnold D. Robbins <arnold@skeeve.com>
* awkcard.in: BWK awk now supports RS as regexp, so remove the
diff --git a/doc/gawk.info b/doc/gawk.info
index e4bf1b21..7322305d 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -27873,6 +27873,11 @@ always 'u'.
the file type is always 'u'. You can use the 'filefuncs' extension
to call 'stat()' in order to get correct type information.
+ By default, if a directory cannot be opened (due to permission
+problems, for example), 'gawk' will exit. As with regular files, this
+situation can be handled using a 'BEGINFILE' rule that checks 'ERRNO'
+and prints an error or otherwise handles the problem.
+
Here is an example:
@load "readdir"
@@ -37602,90 +37607,90 @@ Node: Extension Sample Inplace1123514
Node: Extension Sample Ord1127139
Node: Extension Sample Readdir1127975
Ref: table-readdir-file-types1128864
-Node: Extension Sample Revout1129669
-Node: Extension Sample Rev2way1130258
-Node: Extension Sample Read write array1130998
-Node: Extension Sample Readfile1132940
-Node: Extension Sample Time1134035
-Node: Extension Sample API Tests1135383
-Node: gawkextlib1135875
-Node: Extension summary1138793
-Node: Extension Exercises1142495
-Node: Language History1143737
-Node: V7/SVR3.11145393
-Node: SVR41147545
-Node: POSIX1148979
-Node: BTL1150359
-Node: POSIX/GNU1151088
-Node: Feature History1156866
-Node: Common Extensions1173059
-Node: Ranges and Locales1174342
-Ref: Ranges and Locales-Footnote-11178958
-Ref: Ranges and Locales-Footnote-21178985
-Ref: Ranges and Locales-Footnote-31179220
-Node: Contributors1179441
-Node: History summary1185394
-Node: Installation1186774
-Node: Gawk Distribution1187718
-Node: Getting1188202
-Node: Extracting1189165
-Node: Distribution contents1190803
-Node: Unix Installation1197283
-Node: Quick Installation1197965
-Node: Shell Startup Files1200379
-Node: Additional Configuration Options1201468
-Node: Configuration Philosophy1203783
-Node: Non-Unix Installation1206152
-Node: PC Installation1206612
-Node: PC Binary Installation1207450
-Node: PC Compiling1207885
-Node: PC Using1209002
-Node: Cygwin1212555
-Node: MSYS1213779
-Node: VMS Installation1214280
-Node: VMS Compilation1215071
-Ref: VMS Compilation-Footnote-11216300
-Node: VMS Dynamic Extensions1216358
-Node: VMS Installation Details1218043
-Node: VMS Running1220296
-Node: VMS GNV1224575
-Node: VMS Old Gawk1225310
-Node: Bugs1225781
-Node: Bug address1226444
-Node: Usenet1229426
-Node: Maintainers1230430
-Node: Other Versions1231691
-Node: Installation summary1238779
-Node: Notes1239981
-Node: Compatibility Mode1240775
-Node: Additions1241557
-Node: Accessing The Source1242482
-Node: Adding Code1243919
-Node: New Ports1250138
-Node: Derived Files1254513
-Ref: Derived Files-Footnote-11260173
-Ref: Derived Files-Footnote-21260208
-Ref: Derived Files-Footnote-31260806
-Node: Future Extensions1260920
-Node: Implementation Limitations1261578
-Node: Extension Design1262761
-Node: Old Extension Problems1263905
-Ref: Old Extension Problems-Footnote-11265423
-Node: Extension New Mechanism Goals1265480
-Ref: Extension New Mechanism Goals-Footnote-11268844
-Node: Extension Other Design Decisions1269033
-Node: Extension Future Growth1271146
-Node: Notes summary1271982
-Node: Basic Concepts1273140
-Node: Basic High Level1273821
-Ref: figure-general-flow1274103
-Ref: figure-process-flow1274788
-Ref: Basic High Level-Footnote-11278089
-Node: Basic Data Typing1278274
-Node: Glossary1281602
-Node: Copying1313440
-Node: GNU Free Documentation License1350983
-Node: Index1376103
+Node: Extension Sample Revout1129931
+Node: Extension Sample Rev2way1130520
+Node: Extension Sample Read write array1131260
+Node: Extension Sample Readfile1133202
+Node: Extension Sample Time1134297
+Node: Extension Sample API Tests1135645
+Node: gawkextlib1136137
+Node: Extension summary1139055
+Node: Extension Exercises1142757
+Node: Language History1143999
+Node: V7/SVR3.11145655
+Node: SVR41147807
+Node: POSIX1149241
+Node: BTL1150621
+Node: POSIX/GNU1151350
+Node: Feature History1157128
+Node: Common Extensions1173321
+Node: Ranges and Locales1174604
+Ref: Ranges and Locales-Footnote-11179220
+Ref: Ranges and Locales-Footnote-21179247
+Ref: Ranges and Locales-Footnote-31179482
+Node: Contributors1179703
+Node: History summary1185656
+Node: Installation1187036
+Node: Gawk Distribution1187980
+Node: Getting1188464
+Node: Extracting1189427
+Node: Distribution contents1191065
+Node: Unix Installation1197545
+Node: Quick Installation1198227
+Node: Shell Startup Files1200641
+Node: Additional Configuration Options1201730
+Node: Configuration Philosophy1204045
+Node: Non-Unix Installation1206414
+Node: PC Installation1206874
+Node: PC Binary Installation1207712
+Node: PC Compiling1208147
+Node: PC Using1209264
+Node: Cygwin1212817
+Node: MSYS1214041
+Node: VMS Installation1214542
+Node: VMS Compilation1215333
+Ref: VMS Compilation-Footnote-11216562
+Node: VMS Dynamic Extensions1216620
+Node: VMS Installation Details1218305
+Node: VMS Running1220558
+Node: VMS GNV1224837
+Node: VMS Old Gawk1225572
+Node: Bugs1226043
+Node: Bug address1226706
+Node: Usenet1229688
+Node: Maintainers1230692
+Node: Other Versions1231953
+Node: Installation summary1239041
+Node: Notes1240243
+Node: Compatibility Mode1241037
+Node: Additions1241819
+Node: Accessing The Source1242744
+Node: Adding Code1244181
+Node: New Ports1250400
+Node: Derived Files1254775
+Ref: Derived Files-Footnote-11260435
+Ref: Derived Files-Footnote-21260470
+Ref: Derived Files-Footnote-31261068
+Node: Future Extensions1261182
+Node: Implementation Limitations1261840
+Node: Extension Design1263023
+Node: Old Extension Problems1264167
+Ref: Old Extension Problems-Footnote-11265685
+Node: Extension New Mechanism Goals1265742
+Ref: Extension New Mechanism Goals-Footnote-11269106
+Node: Extension Other Design Decisions1269295
+Node: Extension Future Growth1271408
+Node: Notes summary1272244
+Node: Basic Concepts1273402
+Node: Basic High Level1274083
+Ref: figure-general-flow1274365
+Ref: figure-process-flow1275050
+Ref: Basic High Level-Footnote-11278351
+Node: Basic Data Typing1278536
+Node: Glossary1281864
+Node: Copying1313702
+Node: GNU Free Documentation License1351245
+Node: Index1376365

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 55aa8ce1..2ae6d564 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -37967,6 +37967,11 @@ type is always @samp{u}. You can use the @code{filefuncs} extension to call
@code{stat()} in order to get correct type information.
@end quotation
+By default, if a directory cannot be opened (due to permission problems,
+for example), @command{gawk} will exit. As with regular files, this
+situation can be handled using a @code{BEGINFILE} rule that checks
+@code{ERRNO} and prints an error or otherwise handles the problem.
+
Here is an example:
@example
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index 0c41d4d4..e6f778ac 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -36938,6 +36938,11 @@ type is always @samp{u}. You can use the @code{filefuncs} extension to call
@code{stat()} in order to get correct type information.
@end quotation
+By default, if a directory cannot be opened (due to permission problems,
+for example), @command{gawk} will exit. As with regular files, this
+situation can be handled using a @code{BEGINFILE} rule that checks
+@code{ERRNO} and prints an error or otherwise handles the problem.
+
Here is an example:
@example
diff --git a/extension/ChangeLog b/extension/ChangeLog
index f85683a4..d71ac219 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,8 @@
+2019-11-03 Arnold D. Robbins <arnold@skeeve.com>
+
+ * readdir.3am: Document that readdir extension can cause a
+ fatal error, which should be handled with BEGINFILE.
+
2019-10-16 Andrew J. Schorr <aschorr@telemetry-investments.com>
* filefuncs.3am: Enhance the stat() documentation to explain that
diff --git a/extension/readdir.3am b/extension/readdir.3am
index e4f24dff..531c65cf 100644
--- a/extension/readdir.3am
+++ b/extension/readdir.3am
@@ -1,4 +1,4 @@
-.TH READDIR 3am "Mar 17 2019" "Free Software Foundation" "GNU Awk Extension Modules"
+.TH READDIR 3am "Oct 30 2019" "Free Software Foundation" "GNU Awk Extension Modules"
.SH NAME
readdir \- directory input parser for gawk
.SH SYNOPSIS
@@ -42,6 +42,16 @@ to calling
in order to provide the information.
Thus the third field should never be
.BR u .
+.PP
+By default, if a directory cannot be opened (due to permission problems,
+for example),
+.I gawk
+will exit.
+As with regular files, this situation can be handled using a
+.B BEGINFILE
+rule that checks
+.B ERRNO
+and prints an error or otherwise handles the problem.
.\" .SH BUGS
.SH EXAMPLE
.ft CW