I’m trying to write a simple bash script that opens up GQRX, sends it some TCP commands, then closes it down.

Unfortunately, I’ve found that when I close the program like this, the next time it opens, it will pop up a window saying “crash detected” and ask me to review the configuration file. This prevents the app from loading unless someone is present to click the dialog box.

This error only seems to happen when I try to close the program using the bash script. Closing it by just clicking the X doesn’t cause this problem next time it’s launched.

I think I’m closing the app too aggressively which terminates it before it can wrap up its affairs, and it interprets this as a crash. What’s the best way to close the app to keep this from happening?

I’ve tried:

  • pkill -3 gqrx
  • pkill -13 gqrx

But the problem persists. Is there an even softer way to close an application?

  • just_another_person@lemmy.world
    link
    fedilink
    arrow-up
    16
    arrow-down
    1
    ·
    9 months ago

    Read up on signals, and signal handling. Each number of signal sent has a different effect according to how they SHOULD be handled, but it’s really.uo to the developer as to how they are actually handled when received by running code. Just learn the basic 5 levels you may need, and stick with those. Very few people (if anyone) has all of the different signals memorized, and most programs wouldn’t handle each signal in a completely unique way.