Skip to content

Commit e09d861

Browse files
committed
Don't background IDE job when launched from shell wrapper
This is a shell anti-pattern and hinders integration into normal Linux desktop usage. Only daemon launchers should background a job, and even then only on request. Instead we actually want to `exec` it, which has the effect of cleaning up the wrapper script processes, making sure all the signals are connected to the _actual_ foreground process, and passing exit codes and such through when all is said and done.
1 parent af914e8 commit e09d861

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

zbstudio/zbstudio.in

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
#!/bin/bash
1+
#!/usr/bin/env sh
22

33
if [[ "$(uname -m)" == "x86_64" ]]; then ARCH="x64"; else ARCH="x86"; fi
44
CWD="$PWD" # save the current directory, as it's going to change
55

6-
(cd "@IDE_DATADIR@"; bin/linux/$ARCH/lua src/main.lua zbstudio -cwd "$CWD" "$@") &
6+
cd "@IDE_DATADIR@"
7+
exec bin/linux/$ARCH/lua src/main.lua zbstudio -cwd "$CWD" "$@"

0 commit comments

Comments
 (0)