- param_expand: don't set W_SPLITSPACE for $* unless IFS is NULL;
consistent with other uses of W_SPLITSPACE
+ 10/22
+ -----
+doc/{bash.1,bashref.texi}
+ - tweak description of bash conditional expressions to note that the
+ test and [ commands determine their behavior based on the number of
+ arguments. Suggested by Ilkka Virta <itvirta@iki.fi>
+
+ 10/24
+ -----
+execute_cmd.c
+ - execute_simple_command: don't set $_ to NULL when executing a
+ command that forks; just leave it unchanged. Tweaked the documentation
+ slightly as a result. Inspired by report from Ricky Tigg
+ <ricky.tigg@gmail.com>
+
+ 10/28
+ -----
+redir.c
+ - here_document_to_fd: make sure the temp files used to store here
+ documents are readable (and writable, where necessary) by the user.
+ This can happen in the unlikely case that someone decides to shoot
+ himself in the foot by setting the umask to 400. Issue originally
+ raised back in March by Stephane Chazelas
+ <stephane.chazelas@gmail.com>; fix inspired by Martijn Dekker
+ <martijn@inlv.org>
.\" Case Western Reserve University
.\" chet.ramey@case.edu
.\"
-.\" Last Change: Fri Oct 5 14:53:12 EDT 2018
+.\" Last Change: Mon Oct 22 09:55:27 EDT 2018
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
-.TH BASH 1 "2018 October 5" "GNU Bash 5.0"
+.TH BASH 1 "2018 October 22" "GNU Bash 5.0"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
At shell startup, set to the absolute pathname used to invoke the
shell or shell script being executed as passed in the environment
or argument list.
-Subsequently, expands to the last argument to the previous command,
-after expansion.
+Subsequently, expands to the last argument to the previous simple
+command executed in the foreground, after expansion.
Also set to the full pathname used to invoke each command executed
and placed in the environment exported to that command.
When checking mail, this parameter holds the name of the mail file
Conditional expressions are used by the \fB[[\fP compound command and
the \fBtest\fP and \fB[\fP builtin commands to test file attributes
and perform string and arithmetic comparisons.
+The \fBtest\fP abd \fB[\fP commands determine their behavior based on
+the number of arguments; see the descriptions of those commands for any
+other command-specific actions.
+.PP
Expressions are formed from the following unary or binary primaries.
\fBBash\fP handles several filenames specially when they are used in
expressions.
At shell startup, set to the absolute pathname used to invoke the
shell or shell script being executed as passed in the environment
or argument list.
-Subsequently, expands to the last argument to the previous command,
-after expansion.
+Subsequently, expands to the last argument to the previous simple
+command executed in the foreground, after expansion.
Also set to the full pathname used to invoke each command executed
and placed in the environment exported to that command.
When checking mail, this parameter holds the name of the mail file.
@item 3 arguments
The following conditions are applied in the order listed.
+
+@enumerate
+@item
If the second argument is one of the binary conditional
operators (@pxref{Bash Conditional Expressions}), the
result of the expression is the result of the binary test using the
first and third arguments as operands.
The @samp{-a} and @samp{-o} operators are considered binary operators
when there are three arguments.
+@item
If the first argument is @samp{!}, the value is the negation of
the two-argument test using the second and third arguments.
+@item
If the first argument is exactly @samp{(} and the third argument is
exactly @samp{)}, the result is the one-argument test of the second
argument.
+@item
Otherwise, the expression is false.
+@end enumerate
@item 4 arguments
If the first argument is @samp{!}, the result is the negation of
@cindex expressions, conditional
Conditional expressions are used by the @code{[[} compound command
-and the @code{test} and @code{[} builtin commands.
+and the @code{test} and @code{[} builtin commands. The @code{test}
+and @code{[} commands determine their behavior based on the number
+of arguments; see the descriptions of those commands for any other
+command-specific actions.
-Expressions may be unary or binary.
+Expressions may be unary or binary,
+and are formed from the following primaries.
Unary expressions are often used to examine the status of a file.
There are string operators and numeric comparison operators as well.
Bash handles several filenames specially when they are used in
Copyright (C) 1988-2018 Free Software Foundation, Inc.
@end ignore
-@set LASTCHANGE Fri Oct 5 14:52:51 EDT 2018
+@set LASTCHANGE Mon Oct 22 09:55:52 EDT 2018
@set EDITION 5.0
@set VERSION 5.0
-@set UPDATED 5 October 2018
+@set UPDATED 22 October 2018
@set UPDATED-MONTH October 2018
#endif
#endif
command_line = (char *)NULL; /* don't free this. */
+#if 0
bind_lastarg ((char *)NULL);
+#endif
return (result);
}
}
return (fd);
}
+ fchmod (fd, S_IRUSR | S_IWUSR);
SET_CLOSE_ON_EXEC (fd);
errno = r = 0; /* XXX */
}
free (filename);
+
+ fchmod (fd2, S_IRUSR);
return (fd2);
}