Dyalog / ride

Cross-platform IDE for Dyalog APL
https://dyalog.github.io/ride
MIT License
206 stars 32 forks source link

Mac: Cmd+q appears to quit APL but can leave "invisible" background process running. #136

Open JohnScholes opened 7 years ago

JohnScholes commented 7 years ago

RIDE Issue Report

Describe the issue you are having

If an APL process is looping, typing Cmd+q, or the equivalent using the Force Quit ... menu, kills the session window but leaves a dyalog process running.

Did you connect to an already running interpreter or start the interpreter from RIDE?

No

How do you reproduce the issue?

  {∇⍵}0      ⍝ hangs.

Now type Cmd+q ... Quit Dyalog APL. Are you sure? Yes The application appears to quit and disappears from the ->Force Quit... list of running applications. However, the dyalog process continues to run, using 100% of a core.

Paste the contents of Help → About (Shift+F1)

IDE: Version: 4.0.2749 Platform: MacIntel Date: 2017-03-17 13:59:13 +0000 Git commit: f75e3cf19b54ab6a231f74ed1ec4d7ad7bdae3b3 Preferences:{ "lineNums":"0", "zoom":"7" }

Interpreter: Version: 16.0.29523 Platform: Mac-64 Edition: Unicode/64 Date: Mar 19 2017 at 02:32:01

jayfoad commented 7 years ago

This might be an unfortunate consequence of 8d08385f6757265c8c73aa9c988b578f6137bdd2 where we "detached" spawned APL processes from the main RIDE process, in order to make things work better on Windows.

johndaintree commented 7 years ago

Assuming that the interpreter is legitimately "busy", we may want RIDE to wait until the APL process has gone before it closes. Of course, it's also possible that the interpreter is illegitimately stuck during its exit.

Does this happen all the time?

/JD

From: jayfoad [mailto:notifications@github.com] Sent: 21 March 2017 09:41 To: Dyalog/ride ride@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [Dyalog/ride] Mac: Cmd+q appears to quit APL but can leave "invisible" background process running. (#136)

This might be an unfortunate consequence of https://github.com/Dyalog/ride/commit/8d08385f6757265c8c73aa9c988b578f6137bdd2 8d08385 where we "detached" spawned APL processes from the main RIDE process, in order to make things work better on Windows.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Dyalog/ride/issues/136#issuecomment-288025101 , or mute the thread https://github.com/notifications/unsubscribe-auth/AKU_CbpG_HqOea7_Vc0_WEFmSFar3BQuks5rn5s3gaJpZM4MjgtJ . https://github.com/notifications/beacon/AKU_CdKtRxoc5MmlAcoJ8iPx7n7E2SaUks5rn5s3gaJpZM4MjgtJ.gif

JohnScholes commented 7 years ago

I think that Cmd+q on a Mac means "quit the application", like Alt+F4 on Windows. Some Mac apps, such as VM-ware, seem to trap this and do some emergency saving of state, but they then exit cleanly, releasing their resources.

FWIW: I use Cmd+q all the time because I use loads of apps and can't be arsed to learn each one's particular way out.

On 21 Mar 2017, at 09:44, johndaintree notifications@github.com wrote:

Assuming that the interpreter is legitimately "busy", we may want RIDE to wait until the APL process has gone before it closes. Of course, it's also possible that the interpreter is illegitimately stuck during its exit.

Does this happen all the time?

/JD

From: jayfoad [mailto:notifications@github.com] Sent: 21 March 2017 09:41 To: Dyalog/ride ride@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [Dyalog/ride] Mac: Cmd+q appears to quit APL but can leave "invisible" background process running. (#136)

This might be an unfortunate consequence of https://github.com/Dyalog/ride/commit/8d08385f6757265c8c73aa9c988b578f6137bdd2 8d08385 where we "detached" spawned APL processes from the main RIDE process, in order to make things work better on Windows.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Dyalog/ride/issues/136#issuecomment-288025101 , or mute the thread https://github.com/notifications/unsubscribe-auth/AKU_CbpG_HqOea7_Vc0_WEFmSFar3BQuks5rn5s3gaJpZM4MjgtJ . https://github.com/notifications/beacon/AKU_CdKtRxoc5MmlAcoJ8iPx7n7E2SaUks5rn5s3gaJpZM4MjgtJ.gif

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Dyalog/ride/issues/136#issuecomment-288025971, or mute the thread https://github.com/notifications/unsubscribe-auth/AH_E5wnxpZsywQ61N_iIQkF1i_FuzfWLks5rn5wPgaJpZM4MjgtJ.

jayfoad commented 7 years ago

I've fixed this in interpreter version 17.0.31160 for the case where the interpreter is weak-interruptible. You still get the same problem with loops like -⍣=1 which only respond to a strong interrupt.