2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
6 #include "__arosc_privdata.h"
8 #include <aros/symbolsets.h>
12 #include LC_LIBDEFS_FILE
14 /*****************************************************************************
30 umask is currently remembered but not used in any function
40 ******************************************************************************/
42 struct aroscbase
*aroscbase
= __aros_getbase_aroscbase();
43 mode_t oumask
= aroscbase
->acb_umask
;
45 aroscbase
->acb_umask
= numask
;
50 static int __umask_init(struct aroscbase
*aroscbase
)
52 struct aroscbase
*paroscbase
;
54 paroscbase
= __GM_GetBaseParent(aroscbase
);
56 /* TODO: Implement umask() properly
57 Currently information is not used in any of the related functions
60 /* Child of exec*()/vfork() functions inherit umask of parent */
61 if (paroscbase
&& (paroscbase
->acb_flags
& (VFORK_PARENT
| EXEC_PARENT
)))
62 aroscbase
->acb_umask
= paroscbase
->acb_umask
;
64 aroscbase
->acb_umask
= S_IWGRP
|S_IWOTH
;
69 ADD2OPENLIB(__umask_init
, 0);