FreeBSD Bugzilla – Attachment 9215 Details for
Bug 18953
[PATCH] Code example in mktemp(1) doesn't work
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.34 KB, created by
mark
on 2000-06-01 20:30:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
mark
Created:
2000-06-01 20:30:01 UTC
Size:
1.34 KB
patch
obsolete
>*** /usr/share/man/man1/mktemp.1.orig Sat May 6 19:55:50 2000 >--- /usr/share/man/man1/mktemp.1 Sun May 28 15:24:20 2000 >*************** >*** 152,170 **** > where the script should quit if it cannot get a safe > temporary file. > .Bd -literal -offset indent >! TMPFILE=`mktemp /tmp/$0.XXXXXX` || exit 1 > echo "program output" >> $TMPFILE > .Ed > .Pp > To allow the use of $TMPDIR: > .Bd -literal -offset indent >! TMPFILE=`mktemp -t $0` || exit 1 > echo "program output" >> $TMPFILE > .Ed > .Pp > In this case, we want the script to catch the error itself. > .Bd -literal -offset indent >! TMPFILE=`mktemp -q /tmp/$0.XXXXXX` > if [ $? -ne 0 ]; then > echo "$0: Can't create temp file, exiting..." > exit 1 >--- 152,173 ---- > where the script should quit if it cannot get a safe > temporary file. > .Bd -literal -offset indent >! tempfoo=`basename $0` >! TMPFILE=`mktemp /tmp/${tempfoo}.XXXXXX` || exit 1 > echo "program output" >> $TMPFILE > .Ed > .Pp > To allow the use of $TMPDIR: > .Bd -literal -offset indent >! tempfoo=`basename $0` >! TMPFILE=`mktemp -t ${tempfoo}` || exit 1 > echo "program output" >> $TMPFILE > .Ed > .Pp > In this case, we want the script to catch the error itself. > .Bd -literal -offset indent >! tempfoo=`basename $0` >! TMPFILE=`mktemp -q /tmp/${tempfoo}.XXXXXX` > if [ $? -ne 0 ]; then > echo "$0: Can't create temp file, exiting..." > exit 1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 18953
: 9215