diff --git a/manual/Unit posix b/manual/Unit posix
index 59861be..1a550c3 100644
a
|
b
|
the user- and group-ids {{UID}} and {{GID}} (which should be |
529 | 529 | exact integers) using the {{chown()}} system call. |
530 | 530 | |
531 | 531 | |
| 532 | ==== file-creation-mode |
| 533 | |
| 534 | <procedure>(file-creation-mode MODE)</procedure> |
| 535 | |
| 536 | Returns the initial file permissions used for newly created files |
| 537 | (as with {{umask(2)}}. You can set the mode by executing |
| 538 | |
| 539 | (set! (file-creation-mode) MODE) |
| 540 | |
| 541 | where {{MODE}} is a bitwise combination of one or more of |
| 542 | the {{perm/...}} flags. |
| 543 | |
| 544 | |
532 | 545 | === Processes |
533 | 546 | |
534 | 547 | ==== current-process-id |
… |
… |
always returns {{0}}, {{0}}. |
1212 | 1225 | ; {{file-close}} : {{close}} |
1213 | 1226 | ; {{file-access-time}} : {{stat}} |
1214 | 1227 | ; {{file-change-time}} : {{stat}} |
| 1228 | ; {{file-creation-mode}} : {{umask}} |
1215 | 1229 | ; {{file-modification-time}} : {{stat}} |
1216 | 1230 | ; {{file-execute-access?}} : {{access}} |
1217 | 1231 | ; {{file-open}} : {{open}} |
diff --git a/posix-common.scm b/posix-common.scm
index 8961768..bd188fc 100644
a
|
b
|
EOF |
361 | 361 | (follow-symlinks #t)) |
362 | 362 | (##sys#find-files dir test action seed limit follow-symlinks dotfiles 'find-files)) |
363 | 363 | args)))) |
| 364 | |
| 365 | |
| 366 | ;;; umask |
| 367 | |
| 368 | (define file-creation-mode |
| 369 | (getter-with-setter |
| 370 | (lambda () |
| 371 | (let ((um (##core#inline "C_umask" 0))) |
| 372 | (##core#inline "C_umask" um) |
| 373 | um)) |
| 374 | (lambda (um) |
| 375 | (##core#inline "C_umask" um)) |
| 376 | "(file-creation-mode mode)")) |
diff --git a/posix.import.scm b/posix.import.scm
index 2118ccb..3414b79 100644
a
|
b
|
|
99 | 99 | fifo? |
100 | 100 | file-access-time |
101 | 101 | file-change-time |
| 102 | file-creation-mode |
102 | 103 | file-close |
103 | 104 | file-control |
104 | 105 | file-execute-access? |
diff --git a/posixunix.scm b/posixunix.scm
index 847394f..a9fa2f8 100644
a
|
b
|
static C_TLS struct stat C_statbuf; |
199 | 199 | #define C_test_access(fn, m) C_fix(access((char *)C_data_pointer(fn), C_unfix(m))) |
200 | 200 | #define C_close(fd) C_fix(close(C_unfix(fd))) |
201 | 201 | #define C_sleep sleep |
| 202 | #define C_umask(m) C_fix(umask(C_unfix(m))) |
202 | 203 | |
203 | 204 | #define C_lstat(fn) C_fix(lstat((char *)C_data_pointer(fn), &C_statbuf)) |
204 | 205 | |
diff --git a/posixwin.scm b/posixwin.scm
index 0d012da..f4de4ad 100644
a
|
b
|
C_free_arg_string(char **where) { |
304 | 304 | |
305 | 305 | #define C_flushall() C_fix(_flushall()) |
306 | 306 | |
| 307 | #define C_umask(m) C_fix(_umask(C_unfix(m))) |
| 308 | |
307 | 309 | #define C_ctime(n) (C_secs = (n), ctime(&C_secs)) |
308 | 310 | |
309 | 311 | #define C_tm_set_08(v) \ |
diff --git a/types.db b/types.db
index fc10fbc..9bfff61 100644
a
|
b
|
|
776 | 776 | (file-change-time (procedure file-change-time ((or string fixnum)) number)) |
777 | 777 | (file-close (procedure file-close (fixnum) undefined)) |
778 | 778 | (file-control (procedure file-control (fixnum fixnum #!optional fixnum) fixnum)) |
| 779 | (file-creation-mode (procedure file-creation-mode () fixnum)) |
779 | 780 | (file-execute-access? (procedure file-execute-access? (string) boolean)) |
780 | 781 | (file-link (procedure file-link (string string) undefined)) |
781 | 782 | (file-lock (procedure file-lock (port #!optional fixnum *) (struct lock))) |