Changeset ae34340dde2024044a43857931d99258a1b3a477
- Timestamp:
- 03/30/09 16:19:10
(4 years ago)
- Author:
- Theo Schlossnagle <jesus@omniti.com>
- git-committer:
- Theo Schlossnagle <jesus@omniti.com> 1238429950 +0000
- git-parent:
[9a3bb6635e137b31c2c26ec15280df4b5dfa600e]
- git-author:
- Theo Schlossnagle <jesus@omniti.com> 1238429950 +0000
- Message:
persist the mode and use it on reopen
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rf99cf46 |
rae34340 |
|
| 26 | 26 | posix_logio_open(noit_log_stream_t ls) { |
|---|
| 27 | 27 | int fd; |
|---|
| 28 | | fd = open(ls->path, O_CREAT|O_WRONLY|O_APPEND, 0664); |
|---|
| | 28 | ls->mode = 0664; |
|---|
| | 29 | fd = open(ls->path, O_CREAT|O_WRONLY|O_APPEND, ls->mode); |
|---|
| 29 | 30 | if(fd < 0) { |
|---|
| 30 | 31 | ls->op_ctx = NULL; |
|---|
| … | … | |
| 39 | 40 | int newfd, oldfd; |
|---|
| 40 | 41 | oldfd = (int)ls->op_ctx; |
|---|
| 41 | | newfd = open(ls->path, O_CREAT|O_WRONLY|O_APPEND); |
|---|
| | 42 | newfd = open(ls->path, O_CREAT|O_WRONLY|O_APPEND, ls->mode); |
|---|
| 42 | 43 | if(newfd >= 0) { |
|---|
| 43 | 44 | ls->op_ctx = (void *)newfd; |
|---|
| r84d6f13 |
rae34340 |
|
| 30 | 30 | int enabled:1; |
|---|
| 31 | 31 | int debug:1; |
|---|
| | 32 | int mode; |
|---|
| 32 | 33 | char *path; |
|---|
| 33 | 34 | logops_t *ops; |
|---|