mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
sb: Set the uid and gid on POSIX systems
This improves performance because it avoids an exec each time the _uid macro is referenced and that can be a number of times for each config parsed.
This commit is contained in:
parent
39ca2970a5
commit
5e4b3b9098
@ -46,7 +46,7 @@ basepath = 'sb'
|
||||
#
|
||||
# Save the host and POSIX state.
|
||||
#
|
||||
host_windows = False
|
||||
host_windows = os.name == 'nt'
|
||||
host_posix = True
|
||||
|
||||
class command_line:
|
||||
@ -103,6 +103,10 @@ class command_line:
|
||||
self.defaults[self._long_opts[lo][0]] = ('none',
|
||||
'none',
|
||||
self._long_opts[lo][3])
|
||||
# Set the _uid field, performance improvement on Unix
|
||||
if not host_windows:
|
||||
self.defaults['_uid'] = str(os.getuid())
|
||||
self.defaults['_gid'] = str(os.getgid())
|
||||
|
||||
def __str__(self):
|
||||
def _dict(dd):
|
||||
|
Loading…
x
Reference in New Issue
Block a user