Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#15633 closed bug (fixed)

B_SINGLE_LAUNCH ignored for Symbolic Linked Executables

Reported by: AGMS Owned by: nobody
Priority: normal Milestone: R1/beta2
Component: Kits/Application Kit Version: R1/Development
Keywords: Cc: agmsmith@…
Blocked By: Blocking:
Platform: All

Description

As described in https://www.haiku-os.org/legacy-docs/bebook/BRoster.html executables with this flag should only have one instance running if started from the same executable file. Running that program a second time should just send the existing instance a BMessage with some startup parameters. For example, with StyledEdit, if you run it a second time by double clicking on it in /boot/system/apps/StyledEdit, you get a window named "Untitled 2".

However, if you run the program through a symbolic link, the system doesn't see it as being the same program and starts it running a second time. This happens if you use the Deskbar menu, which is essentially a list of symbolic links to the real executables. For example, running StyledEdit a second time from the menu brings up another "Untitled 1" window, and there are two StyledEdits listed in ProcessController.

The weird thing is that symbolic links work in Terminal. If you use /boot/system/data/deskbar/menu/Applications/StyledEdit & to start it up, it works properly.

So, could be a bug in DeskBar, or in BRoster's launching method, or something else. Possibly somewhere where the code doesn't follow a symbolic link to its target when seeing if it is the same executable file as the running program with the same signature.

Change History (9)

comment:1 by korli, 5 years ago

Component: Applications/DeskbarSystem
Keywords: B_SINGLE_LAUNCH Symbolic Link Executable removed
Owner: changed from jscipione to nobody
Summary: Single Launch Flag Ignored for Symbolic Linked ExecutablesB_SINGLE_LAUNCH ignored for Symbolic Linked Executables

comment:2 by korli, 5 years ago

Component: SystemKits/Application Kit

comment:3 by pulkomandy, 5 years ago

Probably a regression caused by hrev53399

A fix similar to hrev53430 in the appropriate place (where these flags are checked) should help.

comment:4 by pulkomandy, 5 years ago

comment:5 by pulkomandy, 5 years ago

Please confirm hrev53918 fixes it.

comment:6 by AGMS, 5 years ago

Doing a test build over here. Will let you know if it works.

comment:7 by AGMS, 5 years ago

Yes, hrev53918 fixes the double click on symbolic link bug. Tested by double clicking on StyledEdit in the Applications folder or Deskbar menu, and you do indeed get a second window in the existing running program rather than running another instance of it.

comment:8 by pulkomandy, 5 years ago

Resolution: fixed
Status: newclosed

Thanks for checking!

comment:9 by nielx, 5 years ago

Milestone: UnscheduledR1/beta2

Assign tickets with status=closed and resolution=fixed within the R1/beta2 development window to the R1/beta2 Milestone

Note: See TracTickets for help on using tickets.