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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:38:29+00:00 2026-05-27T07:38:29+00:00

I have a web application which runs FontForge shell commands using shell_exec() in PHP.

  • 0

I have a web application which runs FontForge shell commands using shell_exec() in PHP. I’m worried about potential concurrency issues. Is there a way to make shell_exec() open a unique instance for each user?

One of the commands allows users to convert fonts from one file format to another:

$command = "fontforge -c 'Open($1); Generate($2)' ".$format1." ".$format2;
shell_exec($command);

I’m worried that if USER A opens FONT A and USER B immediately opens FONT B (before the Generate() command for USER A is called), then USER A would mistakenly receive FONT B, since FONT B is currently the ‘open’ font.

  • 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-27T07:38:29+00:00Added an answer on May 27, 2026 at 7:38 am

    You not only have to worry about two users colliding but also one user colliding with himself via multiple requests.

    To try and force one font action request per user, you could create pid-like files (but using user id instead of the process id) or you could create a queue of requests (e.g., in a database table) and have a daemon periodically check this queue (setting the working column to 1) for requests by a particular user. Couple this with unique temp working directories per user and collisions will be unlikely.

    Either approach has the potential for getting “stuck” (process ends before it can clear the mechanism). This can be combatted by having the daemon process clear the working flags upon its restart.

    If you’re not worried about simultaneous requests (via policy) and simply want to avoid collisions, you can forgo any daemons and have your PHP script copy the font files into a newly created uniquely named folder for each request, then copy the resulting font out of it upon completion.

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

Sidebar

Related Questions

I have a medium sized application that runs as a .net web-service which I
Using JDeveloper as my IDE, I have a web application which calls services provided
I have a PHP web application which uses a MySQL database for object tagging,
I have a Web application using spring and hibernate and struts (it runs on
I have a web application which runs on MySQL, and uses Java, Struts2 and
We have around 250 identical linux server which runs a business critical web application
I have written a service for JIRA(a web application runs in tomcat) which runs
I have web application which we deployed in a production . We have separate
I have a web application which provides Excel files via IE 7. It requests
I have a web application which contains both secure (SSL) and non-secure pages. A

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.