Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid leaving a zombie process for --onready #462

Merged
merged 1 commit into from
Oct 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions koboldcpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1951,7 +1951,7 @@ def main(launch_args,start_server=True):
def onready_subprocess():
import subprocess
print("Starting Post-Load subprocess...")
subprocess.Popen(args.onready[0], shell=True)
subprocess.run(args.onready[0], shell=True)
timer_thread = threading.Timer(1, onready_subprocess) #1 second delay
timer_thread.start()

Expand Down Expand Up @@ -2021,4 +2021,4 @@ def onready_subprocess():
parser.add_argument("--unbantokens", help="--unbantokens is DEPRECATED and will be removed soon! EOS unbans should now be set via the generate API", action='store_true')
parser.add_argument("--usemirostat", help="--usemirostat is DEPRECATED and will be removed soon! Mirostat values should now be set via the generate API",metavar=('[type]', '[tau]', '[eta]'), type=float, nargs=3)

main(parser.parse_args(),start_server=True)
main(parser.parse_args(),start_server=True)