LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 07-03-2013, 01:31 AM   #1
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 539

Rep: Reputation: 33
kill: bad signal ?


I started a process and the pid is 1234. When I try to kill this process with kill 1234, I got error

Code:
/usr/share/jbossas/bin/standalone.sh: kill: bad signal
The standalone.sh is the script starting the process.
 
Old 07-03-2013, 02:46 AM   #2
anon237
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Cross-posting is against the LQ rules. Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place.

Continue in the other/original thread: https://www.linuxquestions.org/quest...al-4175468296/

Reported for closure.
 
Old 07-03-2013, 03:05 AM   #3
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 539

Original Poster
Rep: Reputation: 33
It seems there is to less posts in Solaris, sothat I post my question by LINUX.
 
Old 07-03-2013, 03:10 AM   #4
anon237
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
All cross-posters think they have a legitimate reason to break the LQ rules.

Just open _one_ thread about a subject, be patient and do not break the rules.
 
Old 07-03-2013, 04:25 PM   #5
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795

Rep: Reputation: 496Reputation: 496Reputation: 496Reputation: 496Reputation: 496
Quote:
Originally Posted by thomas2004ch View Post
It seems there is to less posts in Solaris, sothat I post my question by LINUX.
That doesn't make sense. Either the issue is related on Solaris and this is the right forum or the issue happen on Linux too and Linux software would be fine.

Back to the topic, how are you trying to kill the process (just "kill 1234" or "kill -15 1234" or something else ) ?

Last edited by jlliagre; 07-03-2013 at 04:27 PM.
 
Old 07-04-2013, 03:35 AM   #6
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 539

Original Poster
Rep: Reputation: 33
I got the same error no mather with "kill 1234" or "kill -15 1234".

In RedHat-Linux I don't get such error.
 
Old 07-04-2013, 03:41 PM   #7
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795

Rep: Reputation: 496Reputation: 496Reputation: 496Reputation: 496Reputation: 496
What say:
Code:
type kill
which kill
whence -pv kill
truss -t kill -f kill 1234
?
 
Old 07-09-2013, 01:10 AM   #8
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 539

Original Poster
Rep: Reputation: 33
Code:
-bash-3.2$ type kill
kill is a shell builtin
Code:
-bash-3.2$ which kill
/usr/bin/kill
Code:
-bash-3.2$ whence -pv kill
-bash: whence: command not found
Code:
-bash-3.2$ truss -t kill -f kill 27875
27886:  kill(27875, SIGTERM)                            = 0
-bash-3.2$ /usr/share/jbossas/bin/standalone.sh: kill: bad signal
*** JBossAS process (27875) received  signal ***
 
Old 07-09-2013, 02:35 AM   #9
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795

Rep: Reputation: 496Reputation: 496Reputation: 496Reputation: 496Reputation: 496
The signal is properly sent. Is the process staying alive after the kill or are you just complaining about the error message ?

What says
Code:
egrep "(trap|kill)" /usr/share/jbossas/bin/standalone.sh
?
 
Old 07-09-2013, 04:31 AM   #10
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 539

Original Poster
Rep: Reputation: 33
The prozess is killed, and I complaining about the error message.

Code:
root@S001AP61-TEST (vws-tst1) # egrep "(trap|kill)" /usr/share/jbossas/bin/standalone.sh
echo "  JBoss Bootstrap Environment"
      trap "kill -HUP  $JBOSS_PID" HUP
      trap "kill -TERM $JBOSS_PID" INT
      trap "kill -QUIT $JBOSS_PID" QUIT
      trap "kill -PIPE $JBOSS_PID" PIPE
      trap "kill -TERM $JBOSS_PID" TERM
            SIGNAL_NAME=`kill -l $SIGNAL`
root@S001AP61-TEST (vws-tst1) #
 
Old 07-09-2013, 05:06 PM   #11
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795

Rep: Reputation: 496Reputation: 496Reputation: 496Reputation: 496Reputation: 496
The error likely comes from that line:
Code:
SIGNAL_NAME=`kill -l $SIGNAL`
I guess the standalone.sh script starts with "#!/bin/sh" and wrongly assumes a POSIX shell will be run.

Change that line to one of:

Code:
#!/bin/ksh
or
Code:
#!/bin/bash
or
Code:
#!/usr/xpg4/bin/sh
 
Old 07-10-2013, 02:25 AM   #12
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 539

Original Poster
Rep: Reputation: 33
The standalone.sh does starts with "#!/bin/sh". But after I changed this to "#/bin/bash" it is getting worse since I got the message

*** JBossAS process (5240) received signal ***
*** JBossAS process (5240) received signal ***
*** JBossAS process (5240) received signal ***
...
...


endless and I have to reboot the machine.
 
Old 07-10-2013, 04:56 AM   #13
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795

Rep: Reputation: 496Reputation: 496Reputation: 496Reputation: 496Reputation: 496
Did you try /bin/ksh ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
signal kill some processes gigiion Programming 1 08-19-2009 01:25 AM
Kill Signal Numbers - help? bjdea1 Linux - General 1 06-19-2007 08:55 PM
kill signal linuxjamil Linux - Networking 2 06-03-2007 04:20 AM
what kill signal can be trapped happy78 Programming 3 09-01-2005 08:26 AM
kill won't work (any signal) edman007 Linux - Software 2 09-23-2004 09:08 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 08:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration