LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-07-2002, 10:34 PM   #1
robeb
Member
 
Registered: May 2002
Posts: 113

Rep: Reputation: 15
Sending a process a HUB


What is meant when someones says you must send a process a HUB to reset it, and how is this down?

- Thank you
 
Old 06-08-2002, 06:51 AM   #2
mikek147
Member
 
Registered: Mar 2002
Location: Elyria, Ohio
Distribution: Debian, Nothing else required
Posts: 141

Rep: Reputation: 15
Really, what they are talking about is sending a process a signal, called SIGHUP(POSIX hangup), not HUB. The type of signal sent governs what the process will do. As an example, sending the signal SIGHUP to inetd as:

ps -ef | grep inetd
root 873 1 0 07:20 ? 00:00:00 /usr/sbin/inetd
kill -SIGHUP 873
or
kill -1 873

The kill SIGHUP will send a signal of 1 to the process 873, inetd, causing inetd to re-read its configuration file inetd.conf

The default signal for kill is SIGTERM (15), which, when sent, causes a process to gracefully shut itself down. So:

kill 873
and
kill -SIGTERM 873
or
kill -15 873

are really the same command, in that it is send the process 873 (inetd) a number 15 to have it shut itself down. This is the way all commands should be shut down. With this method, the process closes any files it may have open, deallocates any memory used etc.

In the case of

kill -SIGKILL 873
or
kill -9 873

The kernel is directly shutting down the process. This type of kill should only be used if the SIGTERM signal didn't work.

For reference, do a manpage on signal, and do a more on /usr/include/bits/signum.h -mk
 
Old 06-11-2002, 10:50 AM   #3
Syncrm
Member
 
Registered: Aug 2001
Location: Lansing, Michigan
Distribution: slackware8+
Posts: 472

Rep: Reputation: 30
very informative response, mike. thanx! :-)
 
Old 06-12-2002, 11:36 AM   #4
mikek147
Member
 
Registered: Mar 2002
Location: Elyria, Ohio
Distribution: Debian, Nothing else required
Posts: 141

Rep: Reputation: 15
Glad to help. -mk
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how a father process know which child process send the signal SIGCHLD icoming Programming 10 07-20-2010 07:26 AM
fedora core hub / no hub problem plu5even Linux - Networking 3 02-28-2005 02:30 PM
Sending a signal to a process (Help me) rajesh_b Programming 2 09-17-2004 01:30 AM
Bash Scripting - child process affecting parent process mthaddon Linux - General 1 05-02-2004 01:19 PM
sending process to background Robert0380 Linux - General 5 12-31-2002 03:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:21 AM.

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