Chokes on GETPPID
fredrik at effbot.org
Fri Feb 2 15:49:43 CET 2001
Ben Ocean wrote:
> > > >>>
> > > if not READ_ONLY:
> > > pf = open(PID_FILE, 'w')
> > > pid=str(os.getpid())
> > > try: pid=str(os.getppid())+' '+pid
> > > except: pass
> > > pf.write(pid)
> > > pf.close()
> > > <<<
> > > It specifically identified the *try* statement as the choke-point.
> > > How do I trouble-shoot this?
> >I assume "choke" means that it stopped and printed a
> >traceback message? how about posting that traceback?
> ...with traceback...
> Traceback (innermost last):
> File "/apache/Zope-2.2.4-linux2-x86/z2.py", line 710, in ?
> pf = open(PID_FILE, 'w')
> IOError: [Errno 13] Permission denied:
I'd say it specifically identified the *open* statement as
Do you have write privileges in that directory? If the file
already exists, is it writable?
More information about the Python-list