#9830 closed bug (invalid)
coretool - kill command not work properly
Reported by: | streak | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Applications/Command Line Tools | Version: | R1/Development |
Keywords: | coretools kill command | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
on hrev 45646 works properly while invoking "kill -9 Appname", but on haiku-nightly from 17 jun 2013 this wont work returning info "invalid process id".
kill command from 45646 is 38,63 KB kill command from 17 jun 2013 is 34,63 KB
Attachments (2)
Change History (9)
by , 11 years ago
comment:1 by , 11 years ago
Component: | - General → Applications/Command Line Tools |
---|---|
Version: | R1/alpha4.1 → R1/Development |
/bin/kill isn't what gets invoked, the shell builtin is. In any case, works over here on hrev45774, so I'm afraid you'll need to provide a more specific example.
comment:2 by , 11 years ago
Please check these two biniaries that i attached..
my output from both of them:
> ./kill.castrated -9 WebPositive ./kill.castrated: WebPositive: invalid process id (this one has issue. This command couldnt kill WebPositive) [Fri Jun 21 18:32][user@shredder][/Dev/system/bin] > ./kill -9 WebPositive (this one was executed properly and kills webpositive)
comment:3 by , 11 years ago
As I already said, /bin/kill no longer handles that, bash's builtin kill does since coreutils kill cannot handle killing jobs (c.f. ticket #9687).
To illustrate:
~> type kill kill is a shell builtin ~> ps | grep WebPositive /boot/apps/WebPositive 2194 7 0 0 /boot/common/bin/grep --color=auto WebPositive 2963 1 0 0 ~> kill -9 WebPositive ~> ps | grep WebPositive /boot/common/bin/grep --color=auto WebPositive 2965 1 0 0 ~> uname -a Haiku leviathan 1 hrev45774 Jun 13 2013 18:21:56 BePC Haiku
comment:4 by , 11 years ago
If i spawn process '/bin/kill -9 someapp' from external GUI app [for example from app done in lazarus, that not calls bash] kill will not quit/kill process [i already checked that... it wont work on newest revisions]. So basicaly now command /bin/kill spawned from GUI app via process command is useless.
comment:5 by , 11 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Why would something like lazarus need to invoke /bin/kill at all, rather than using kill_team()? There's really no good reason to do it that way, especially since kill processname isn't reliable when multiple teams with the same name exist, in which case which one gets killed is a matter of luck, so if you're looking to kill specifically the instance you presumably spawned, then you really shouldn't be doing it that way at all.
follow-up: 7 comment:6 by , 11 years ago
Its done in this way because of:
- Portability in lazarus app for haiku / different flawors of linux
- kill_team() which is used pfor example in processcontroller not always kills properly zombie apps [from my experience, zombies are hard to kill using processcontroller. The opposite -kill command works perfectly with lazarus and i dont need to do any fancy stuff to use it on linux and haiku..
comment:7 by , 11 years ago
Replying to streak:
Its done in this way because of:
- Portability in lazarus app for haiku / different flawors of linux
That makes no sense. coreutils kill does not support kill by name on linux either. Kill by PID on the other hand is more reliable and supported on both.
- kill_team() which is used for example in processcontroller not always kills properly zombie apps [from my experience, zombies are hard to kill using processcontroller. The opposite -kill command works perfectly with lazarus and i dont need to do any fancy stuff to use it on linux and haiku..
That makes no sense either, since kill_team() is equivalent to sending kill -9 to the team.
Kill app from may - This is working one