1

'gvfs-mount' doesn't work after using a ctrl+z once and reusing 'gvfs-mount' back again. Consider the situation ::

gvfs-mount smb://172.17.88.47
Password required for 172.17.88.47
User [nanda]: ^Z
[1]+  Stopped                 gvfs-mount smb://172.17.88.47
gvfs-mount smb://172.17.88.47

Then it doesn't work, It blinks, blinks and blinks but doesn't work. Why is this happenning ? But the command works after I quit terminal and start it again, then if I force stop it again It doesn't work untill I restart terminal again.

1 Answer 1

1

Ctrl-Z stops a process, does not terminate it. Than means that if a process has any file "locked" or any resource reserved in a kind-of exclusive way, it will not release them for other process to use. When you terminate the process (in a normal way(1)) the system will clean up after it, and the resources will be available again.

To terminate a process you use Ctrl-C. Sometime Ctrl-C will not work; you can try then Ctrl-\ or, if even this does not work and you need to use Ctrl-Z (it happens), then you have to kill it:

kill %1 

(the number 1 is the number in brackets you see before the "stopped" message).

You can even continue the process (with fg %1) or send it to background (with bg %1). Search for "bash job control" for more information.


Footnotes:

(1) this is why it's better to use kill -9 as a last resort only, after trying a plain kill.

2
  • Thanks that's perfect but could you please elaborate, I mean whats the practical difference between 'stops a process and terminates a process' Mar 21, 2014 at 20:15
  • 1
    I added the requested info to the answer.
    – Rmano
    Mar 21, 2014 at 20:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .