Linux: close a program with command line (not kill it)

Posted by CodeNoob on Super User See other posts from Super User or by CodeNoob
Published on 2012-03-31T05:17:33Z Indexed on 2012/03/31 5:32 UTC
Read the original article Hit count: 499

Filed under:
|
|
|

Some applications only allow one running instance (like eclipse, if you want to use the same workspace). So if I log in from another location, I have to kill/close the application that was open when I previously logged in from another location.

I always use kill command to kill the running process. But, if you kill a process, it might not save some states that are useful for future usage. However, if you "close" it properly byclicking on the close button, for example, it will save the states properly.

Is there a way to properly "close" an application from command line? I know this can vary from applications, so let's be a bit more generic: how to send a signal to another running application, and this signal works just as if we click the "close" button in the top bar?

thanks!

© Super User or respective owner

Related posts about linux

Related posts about command-line