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 6940051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:42:15+00:00 2026-05-27T12:42:15+00:00

This is more of a question about best practices. My server allows users to

  • 0

This is more of a question about best practices. My server allows users to convert fonts from one format to another using FontForge. To prevent collisions, only one font conversion is allowed at any given instance.

When one user initiates a conversion, a PID file is created which acts as a lock. If another user tries to initiate a conversion while the first conversion is still running, then the script will pause for a moment and check for the PID file again.

This repeats until the first process removes the PID file, thus unlocking access to FontForge. However, if the first user cancels the script before it finishes (by pressing the stop button on their browser), then the script exits before the PID file is removed. The second user will never be able to proceed.

What is the best way to handle this?

  • 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-27T12:42:15+00:00Added an answer on May 27, 2026 at 12:42 pm

    Looking at this PHP Man page:

    http://php.net/manual/en/features.connection-handling.php

    I quote:

    You can decide whether or not you want a client disconnect to cause
    your script to be aborted. Sometimes it is handy to always have your
    scripts run to completion even if there is no remote browser receiving
    the output. The default behaviour is however for your script to be
    aborted when the remote client disconnects. This behaviour can be set
    via the ignore_user_abort php.ini directive as well as through the
    corresponding php_value ignore_user_abort Apache httpd.conf directive
    or with the ignore_user_abort() function. If you do not tell PHP to
    ignore a user abort and the user aborts, your script will terminate.

    The one exception is if you have registered a shutdown function using
    register_shutdown_function(). With a shutdown function, when the
    remote user hits his STOP button, the next time your script tries to
    output something PHP will detect that the connection has been aborted
    and the shutdown function is called. This shutdown function will also
    get called at the end of your script terminating normally, so to do
    something different in case of a client disconnect you can use the
    connection_aborted() function. This function will return TRUE if the
    connection was aborted.

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

Sidebar

Related Questions

Colleagues, Preamble. My question is more about best practices. I know one workaround. This
This is more a question about best practices. I have a view with many
This is a question more about best practices/design patterns than regexps. In short I
This question is more a re-insurance than one directly about how to code. As
This question more falls into the category of best practices, and clean/safe code for
I guess this is more of a general best practices question. WordPress recommends including
this is mostly a theoritical question about the best practices. I'm currently programming a
This is more of a best practices question rater than something technical. I'm working
This is kind of a question about best practices. I have a PL/SQL block
This is more of a question about best pattern and practice than asking about

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.