Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 92486 Details for
Bug 141377
sys-process/anacron doesn't compile on g/fbsd
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
files/anacron-2.3-tempnam.patch
anacron-2.3-tempnam.patch (text/plain), 917 bytes, created by
Timothy Redaelli (RETIRED)
on 2006-07-22 06:23:14 UTC
(
hide
)
Description:
files/anacron-2.3-tempnam.patch
Filename:
MIME Type:
Creator:
Timothy Redaelli (RETIRED)
Created:
2006-07-22 06:23:14 UTC
Size:
917 bytes
patch
obsolete
>--- runjob.c.orig Thu Jun 16 17:04:19 2005 >+++ runjob.c Thu Jun 16 17:10:48 2005 >@@ -39,26 +39,14 @@ > temp_file() > /* Open a temporary file and return its file descriptor */ > { >- const int max_retries = 50; >- char *name; >- int fd, i; >+ int fd; >+ char name[] = "/tmp/anacron.XXXXXX"; >+ >+ fd = mkstemp(name); > >- i = 0; >- name = NULL; >- do >- { >- i++; >- free(name); >- name = tempnam(NULL, NULL); >- if (name == NULL) die("Can't find a unique temporary filename"); >- fd = open(name, O_RDWR | O_CREAT | O_EXCL | O_APPEND, >- S_IRUSR | S_IWUSR); >- /* I'm not sure we actually need to be so persistent here */ >- } while (fd == -1 && errno == EEXIST && i < max_retries); >- > if (fd == -1) die_e("Can't open temporary file"); > if (unlink(name)) die_e("Can't unlink temporary file"); >- free(name); >+ > fcntl(fd, F_SETFD, 1); /* set close-on-exec flag */ > return fd; > }
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 141377
:
92482
|
92484
|
92485
| 92486 |
92487
|
92488
|
99157