Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AJAX: readyState not as expected
#1
I'm writing a small application implemented using AJAX. Most of it works. The xgttp object calls a python script which terminates having responded with data.

In one case, the Python script creates a sub process which needs to run in background playing a midi file. The parent process terminates but the readyStatus sticks at 1 until the child process terminates. This is strange, as I've verified that the parent process has terminated and the child is still running and has been inherited by init. But Netstat is still showing the http connection as Established.

The child process is called with:
subprocess.Popen(["/home/pi/staticisor/stat.py", "-p"    , "%s/%s.mid" % (songdir, song)], close_fds=True)
How can I arrange for the readyStatus to progress to 4 as soon as the parent process dies?

Regards - Philip
Reply


Messages In This Thread
AJAX: readyState not as expected - by pleriche - Aug-05-2017, 09:28 PM
RE: AJAX: readyState not as expected - by nilamo - Aug-07-2017, 05:16 PM
RE: AJAX: readyState not as expected - by pleriche - Aug-08-2017, 08:55 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Retrieve data from ajax pthon3 0 1,229 May-29-2022, 10:32 PM
Last Post: pthon3
  POST Reply to Ajax/jQuery (mostly an HTML question) gw1500se 5 2,739 Nov-18-2021, 02:44 PM
Last Post: gw1500se
  Scraping a dynamic data-table in python through AJAX request filozofo 1 3,926 Aug-14-2020, 10:13 AM
Last Post: kashcode
  Flask SelectField using Ajax noah_f 0 2,595 Mar-23-2020, 04:03 PM
Last Post: noah_f
  Ajax and Selenium ankitjindalbti 3 3,389 May-31-2019, 03:40 PM
Last Post: ankitjindalbti

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020