Ticket #1620 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

unix: the process of gajim is called python in 'ps -A'

Reported by: silkensedai@online.fr Assigned to: asterix
Priority: normal Milestone: 0.11
Component: None Version: svn
Severity: trivial Keywords:
Cc: OS:

Description

When I start gajim normally, the process name is called 'python'. When sometimes I want to do a 'killall gajim', I can't because of that.

The head of gajim.py is like this :

#!/bin/sh
''':'
exec python -OOt "$0" ${1+"$@"}
' '''
# many comments

Why don't use this at the beginning ?

#! /usr/bin/env python -OOt
# many comments

I don't quite understand the reason for ${1+"$@"}. So maybe it can be removed. If it is not the case, there is the solution to call the modified gajim.py with another file, gajim:

#! /bin/sh
exec "`dirname "$0"`/gajim.py" ${1+"$@"}

Attachments

gajim-prctl.patch (1.2 kB) - added by zloygod@gmail.com on 08/29/06 18:05:36.
Adds prctl call for 'killall gajim' and also replaces 'exec' with 'exec -a gajim' to see nice 'ps' output

Change History

02/24/06 20:50:46 changed by asterix

  • status changed from new to closed.
  • resolution set to invalid.
  • milestone set to 0.10.

firstly because this doesn't work. We can't add -OOt with /usr/bin/env python

second because even if we remove -OOt we still have python ./gajim.py in ps aux

we also tries exec -a gajim, so we see gajim in ps aux, but killall gajim doesn't work. we still need to do killall python to kill it.

02/24/06 21:48:00 changed by nk

ps -Af | grep python

kill PROCCESS_ID_OF_"python -OOt gajim.py"

08/29/06 16:04:10 changed by zloygod@gmail.com

  • status changed from closed to reopened.

08/29/06 16:11:45 changed by asterix

  • status changed from reopened to closed.
  • milestone changed from 0.10 to 0.11.

fixed in [6687]

08/29/06 18:05:36 changed by zloygod@gmail.com

  • attachment gajim-prctl.patch added.

Adds prctl call for 'killall gajim' and also replaces 'exec' with 'exec -a gajim' to see nice 'ps' output

08/29/06 23:29:30 changed by patrys@pld-linux.org

  • status changed from closed to reopened.

Now it's seriously broken. Shebang lists /bin/sh while you use exec -a

which is an exclusive bash feature and not compatible with other shells. In PLD:

 [patrys@meaw SPECS]$ ls -l /bin/sh
 lrwxrwxrwx  1 root root 3 2006-07-28 03:13 /bin/sh -> ksh

And it just dies saying "-a not found".

08/30/06 00:26:19 changed by bb

08/30/06 06:56:04 changed by asterix

it seems to work with ksh too:

 $ ksh
 $ ./launch.sh -p test

and in another console:

 $ ps aux
 -> asterix  19941 11.4  4.4  64016 34232 pts/1    S+   08:53   0:01 gajim
 -OOt gajim.py -p test

08/30/06 07:45:12 changed by asterix

  • status changed from reopened to closed.

ok we now use #!/bin/bash in [6694]

08/30/06 11:01:40 changed by patrys@pld-linux.org

Asterix:

Thanks for fixing but your above test only proves that ksh is working, as ./launch.sh would still use /bin/sh that points to bash on your system :)


Add/Change #1620 (unix: the process of gajim is called python in 'ps -A')




Change Properties
Action