Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6059267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:41:29+00:00 2026-05-23T08:41:29+00:00

TL;DR version : When I ask Paster to stop-daemon, it fails to read its

  • 0

TL;DR version: When I ask Paster to stop-daemon, it fails to read its own file that it uses to track its process id.

Longer version:

I am running Paster (pastescript 1.7.3) on Python 2.7.1 on Windows Vista.

My first surprise comes from running a simple web-site:

>paster serve development.ini
Starting server in PID 15184.
serving on http://127.0.0.1:5000

I expected to find a paster.pid file in the same directory, but I don’t. Odd. Never mind, let’s make it explicit, by killing that process and starting again.

>paster serve development.ini --pid-file=my.pid
Starting server in PID 20884.
serving on http://127.0.0.1:5000

This time, it creates a file called my.pid. In another command window, I can type:

 >type my.pid
 20884

The web-site is being served successfully and Task Manager confirms there is a python process running with PID 20884.

Now, let’s ask paster to report on the status of the daemon:

>paster serve development.ini --status --pid-file=my.pid
PID None in my.pid is not running

>type my.pid
20884

Odd. It claims the the PID inside my.pid is None, when it isn’t.

Let’s shut it down.

>paster serve --stop-daemon --pid-file=my.pid
PID in my.pid is not valid (deleting)

>type my.pid
The system cannot find the file specified.

So, it tried to read my.pid, couldn’t read it, and deleted it in frustration.

Meanwhile the daemon continues to run.

I have to kill the paster daemon by hand, which is what @Lennart Regebro recommends in a similar, less detailed question.
I want to automate this as part of my testing, so I am hoping to find a cleaner solution.

Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:41:30+00:00Added an answer on May 23, 2026 at 8:41 am

    From paste script’s source code(serve.py), in the PID reading method:

    pid = read_pidfile(pidfile)
    if pid:
        try:
            os.kill(int(pid), 0)
            return pid
        except OSError, e:
            if e.errno == errno.EPERM:
                return pid
    return None
    

    On POSIX-compatible platforms, specifying 0 as a signal just checks whether the process is alive.

    However, on Windows, there is no kill system call; Python will use TerminateProcess instead. Remove the os.kill line from paster script or use a POSIX-compatible platform, like Cygwin (POSIX layer on top of Windows) or Linux.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I ask because I have an unsigned jar that runs and a signed version
Before you ask, Why are you using that old version of Perl?, it is
Short Version: When I've created a Channel using ChannelFactory on a client which uses
How can i ask what version of MSXML an IXMLDOMDocument2 is? Given an IXMLDOMDocument2
How can i find what version of browser a user is using and ask
I'm sorry that I have to ask that here, but I haven't found a
I am not sure that this is the right place to ask this, but
I carefully read the question 'Official way to ask jQuery wait for all images
Version Control with Subversion recommends the following layout for (single-project) repositories (complemented by this
The version of Subclipse (1.2.4) currently available through Aptana's automatic Plugins Manager does not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.