BitShares Forum

Main => Technical Support => Topic started by: FuLl on September 16, 2014, 04:02:41 am

Title: How to gracefully shutdown BitSharesX client via windows batchfile
Post by: FuLl on September 16, 2014, 04:02:41 am
Hi,

Most every time my Acronis TrueImage backup starts every night, it completely freezes my computer & requires me to press & hold the power button to shut it down & restart it. It only happens if the BitSharesX client is running when the backup starts.

I can have Acronis run a batch file before the task starts, & I'd like to know how to close the client that way so this doesn't keep happening.

Is there a command to shut it down cleanly?

Please advise.

Thanks,
-F
Title: Re: How to gracefully shutdown BitSharesX client via windows batchfile
Post by: FuLl on September 16, 2014, 05:13:49 am
I can run 'taskkill /f /im BitSharesX.exe', but it kills the process rather than closing the app.

Then I have to reset the database each time it starts again. Less than ideal.
Title: Re: How to gracefully shutdown BitSharesX client via windows batchfile
Post by: xeroc on September 16, 2014, 06:26:59 am
that seems to be a QT-gui bug ..
I opened an issue https://github.com/BitShares/qt_wallet/issues/48

you are not alone with that issue
Title: Re: How to gracefully shutdown BitSharesX client via windows batchfile
Post by: FuLl on September 16, 2014, 06:59:25 am
I'll just have to only run it on an as-needed basis. It's safer to update the sync each time than wait for the db to reindex every day.

One of the luxury problems I face as an early adopter. :-)
Title: Re: How to gracefully shutdown BitSharesX client via windows batchfile
Post by: xeroc on September 16, 2014, 07:21:53 am
One of the luxury problems I face as an early adopter. :-)
Thanks for seeing it that way .. I have lot's of difficulties some times to tell people that this is cutting edge and can be rough :-)
Title: Re: How to gracefully shutdown BitSharesX client via windows batchfile
Post by: modprobe on September 17, 2014, 02:37:57 pm
Unfortunately, due to limitations in the backend, there is not a way to close the app via RPC. I'm not sure if Windows provides a 'kind' way to request an app exit or not, but yes, if you kill BitShares, it will assume it crashed and offer to nuke the database for you when it starts up again. This is strictly optional, you do not have to do it; just click the "Continue Normally" button and it won't rebuild the database unless it detects corruption in it.

I will look into adding a way to request the client exit by using a new instance as a remote control to a previously running instance. This should give you a nice way to quit BitShares X from your batch file.