Bug 378455 - --block doesn't work
Summary: --block doesn't work
Status: RESOLVED WORKSFORME
Alias: None
Product: kate
Classification: Applications
Component: application (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-05 06:59 UTC by Jesper Pedersen
Modified: 2017-04-05 19:08 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesper Pedersen 2017-04-05 06:59:51 UTC
On windows --block doesn't start.
If I run kate --block I expect it to block on the commandline till I'm done editing, but it brings up the window and returns right away.
Comment 1 Kåre Särs 2017-04-05 10:50:10 UTC
Hmm... is that a Windows "feature"...

A bit of Googling found:

"c:\Program Files\Kate\bin\kate.exe" | rem

does this do the trick or have I missed something?
Comment 2 Jesper Pedersen 2017-04-05 14:52:36 UTC
I can start kate just fine.
When I do so on windows, "kate --block" should prevent kate from going into the background, but it doesn't

In linux terms.
"kate --block" on windows would be equal to "kate", while it really behaves like "kate &"

Cheers
Comment 3 Kåre Särs 2017-04-05 19:08:49 UTC
I think the problem is that having a GUI applicaton on Windows implicitly means a virtual & at the end. Adding "| rem" after the command works like removing the & on Linux (except you don't get stderr output).

--block is for when you have an instance already running and don't want to exit the new instance until the old instance (that actually opens the provided file) exits.

On Windows the new instance does not exit, but you don't notice it since the "wise" shell automatically adds a virtual '2> /dev/null &' to all GUI applications ;)

Adding "| rem" is a workaround, but I think we would need a patch/volunteer to dig into the gory details of what special functions to call on windows to prevent the virtual "...&" but at the same time not always open a teminal-window.