Fredrik Lundh wrote: > Yves Glodt wrote: > >> I tried something like this but the umask part does not work clearly...: >> >> newpid = >> os.spawnle(os.P_NOWAIT,'/usr/bin/touch','/usr/bin/touch','xyz','umask 0113') >> >> What would be the correct syntax for setting the umask for the created >> process...? > > not sure, but something like > > try: > old_mask = os.umask(0113) > newpid = os.spawnle(...) > finally: > os.umask(old_mask) # restore > > might work.
It does, I did like this: os.umask(0113) newpid = os.spawnl(os.P_NOWAIT,'/usr/local/bin/wine','/usr/local/bin/wine',executable) But I wanted to use spawnle and it's env argument, to avoid setting umask manually... regards, Yves > </F> > > > -- http://mail.python.org/mailman/listinfo/python-list