-2

I am using OpenShot version 1.4.3 in Ubuntu 14.04 (64 bit).

Here is my system details:

lsb_release -a:

    Distributor ID: Ubuntu
    Description:    Ubuntu 14.04.4 LTS
    Release:    14.04
    Codename:   trusty

uname -a:

    Linux 4.2.0-30-generic #36~14.04.1-Ubuntu SMP
    Fri Feb 26 18:49:23 UTC 2016
    x86_64 x86_64 x86_64 GNU/Linux

I opened openshot to edit my videos on Ubuntu 14.04. but when I tried to close it using kill(also tried pkill) command nothing happened. All other installed applications working properly as expected while trying to close them with kill command.

I even tried kill with sudo, but no use.

  1. Why is kill not working on Openshot?

  2. Is there any known bug is behind this problem in Ubuntu's Openshot implementation?

UPDATE :

As someone mentioned in comment , kill -9 is working properly. but why not kill is not working ?

Somebody may think it as a duplicate for kill and kill -9 commands. But my question is not about how to kill openshot.

My question is why is kill not working for openshot on Ubuntu?. So please ensure before marking my this as duplicate.

In particular, why is OpenShots not working properly with kill? Is its implementation itself is like that or because of any bug?

enter image description here

muru
  • 193,181
  • 53
  • 473
  • 722
Yuvaraj V
  • 1,646
  • 5
  • 17
  • 24
  • 1
    try `killall -9 openshot` or `kill -9 (something goes here)` – dat tutbrus Apr 07 '16 at 13:09
  • 2
    Possible duplicate of [What is the purpose of the -9 option in the kill command?](http://askubuntu.com/questions/184071/what-is-the-purpose-of-the-9-option-in-the-kill-command) – muru Apr 07 '16 at 13:55
  • I am not asking about `kill -9` i am asking about why kill is not working for openshot (particularly) ? so it is not duplicate question.. so please remove unnecessary duplication flag.. @muru – Yuvaraj V Apr 07 '16 at 14:18
  • please read the question again.. my question is particularly why open shot is not working properly with kill.. is it implementation itself is like that or any bug? – Yuvaraj V Apr 07 '16 at 14:38
  • You wrote "All other installed applications working properly as expected while trying to close them with kill command." Why do you kill applications instead of closing them normally? Is there some advantage? – DK Bose Apr 07 '16 at 14:56
  • Hello kill is command line way to close application normally.. By issuing SIGTERM .. Kill -9 is force quite .. My question is that only .. Why open shot on Ubuntu is not quite with SIGTERM ..I am asking reason and clarification . this is because of any bug or something else – Yuvaraj V Apr 07 '16 at 15:08

2 Answers2

2

When this happens, use the "show no mercy" option for kill:

kill -9 5772

Where 5772 is the pid of the application you want to kill.

Or you can kill by process name with:

pkill openshot

Or a slightly more complicated way of doing it. Find the pid and kill it in one line

pidof openshot | xargs kill -9 
Carl H
  • 6,071
  • 5
  • 27
  • 41
  • please read the question again.. my question is particularly why open shot is not working properly with kill.. is it implementation itself is like that or any bug? – Yuvaraj V Apr 07 '16 at 14:38
  • Bro , pkill -9 is OK.. But yet your answer is not enough for my question.. Why open shot on Ubuntu is not working with kill command. Any reason behind that ? – Yuvaraj V Apr 08 '16 at 00:40
2

kill sends a signal to the target process. Process can catch signals and handle them, except for the SIGKILL and SIGSTOP signals. If a process gets a signal which it is not prepared to handle, it dies. If it handles the signal, there is no guarantee that the process will die - it can do whatever it wants to. In other words, a simple kill <pid> is not guaranteed to kill the process.

In this case, OpenShot may be handling SIGTERM, the default signal that kill sends. Since SIGKILL cannot be handled, with kill -9 (which is the same as kill -KILL or kill -SIGKILL), OpenShot is terminated.

However, where possible, kill -9 should not be used. It gives the process no opportunity to clean up, so it may result in data loss/corruption. Try a plain kill first, and if it doesn't die after a reasonable interval, only then try kill -9/kill -KILL.

muru
  • 193,181
  • 53
  • 473
  • 722
  • please read the question again.. my question is particularly why open shot is not working properly with kill.. is it implementation itself is like that or any bug? – Yuvaraj V Apr 07 '16 at 14:38
  • 1
    @shivaraj please read the answer again. If Openshot handles SIGTERM, this is normal behaviour. – muru Apr 07 '16 at 14:39
  • yes right SIGTERM is normal.. my question is why it is not working with normal SIGTERM.. but working with force quite (SIGKILL/kill -9) . – Yuvaraj V Apr 07 '16 at 14:41
  • 1
    @shivaraj My answer is: "If Openshot handles SIGTERM, this is normal behaviour" Applications cannot handle `SIGKILL`, that's why it dies with `kill -9`. – muru Apr 07 '16 at 14:42
  • ok . but why openshot is not handling SIGTERM like any other application in ubuntu? what 's wrong with it? is there any problem in open shot? – Yuvaraj V Apr 07 '16 at 14:45
  • 1
    Why should it? Not all applications die on SIGTERM. Just because the ones you are used to die on SIGTERM doesn't mean every application has to. – muru Apr 07 '16 at 14:47
  • So you are ment to say that .. Abnormal killing is normal in open shot ? So if we want to kill some applications.. We have to do it always in abnormal way ? The SIGKILL is normal ? – Yuvaraj V Apr 07 '16 at 14:55
  • Well, the only one doing abnormal killing here is you. Why don't you use GUI to close Openshot instead of using `kill`? – muru Apr 07 '16 at 15:00
  • Hello.. I know kill through GUI .. If you don't know the answer please better leave it . it's my doubt why it's not working. .. Is that because of any bug in Ubuntu it in open shot. ? If you can't answer.. Please let others answer for it.. Don't mislead the post ..okay – Yuvaraj V Apr 07 '16 at 15:05
  • Well, you're using it in a way it's not intended to be used and then asking if the result is a bug? Ok. Whatever suits you. – muru Apr 07 '16 at 15:09
  • It's my right to ask.. And there is anything wrong in asking for clarification? Why are you dealing with this like.. I did sin ;) just leave it friend .. First of all someone mark it as duplicate.. Without understanding my question.. – Yuvaraj V Apr 07 '16 at 15:22
  • Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/38089/discussion-between-shivaraj-and-muru). – Yuvaraj V Apr 07 '16 at 15:22