IMO, the "proper" way to stop a UNIX daemon is to use the "kill" command. 
That's generally how it is done in Linux, at least. The daemon normally keeps 
its PID in a known location, such as /var/run/daemon.pid. The normal way to 
stop it is to have a root user (or setuid program) issue something like: kill 
-TERM $(cat /var/run/daemon.pid). The signal (-TERM) can often be used to send 
a generic message to the daemon. a -HUP is sometimes used to shut down, but 
other daemons use -HUP to say "read your startup configuration file again for 
changes and implement those changes". 


Note, that with z/OS UNIX, daemons can use the normal START, STOP, and MODIFY 
command interface (or even "hang a WTOR" <shudder/>). It is just very unusual 
for them to do so because most are "ports" from UNIX systems which don't have 
those capabilities.

-- 
John McKown
Systems Engineer IV
IT

Administrative Services Group

HealthMarkets®

9151 Boulevard 26 • N. Richland Hills • TX 76010
(817) 255-3225 phone •
john.mck...@healthmarkets.com • www.HealthMarkets.com

Confidentiality Notice: This e-mail message may contain confidential or 
proprietary information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
HealthMarkets® is the brand name for products underwritten and issued by the 
insurance subsidiaries of HealthMarkets, Inc. –The Chesapeake Life Insurance 
Company®, Mid-West National Life Insurance Company of TennesseeSM and The MEGA 
Life and Health Insurance Company.SM


> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU]
> On Behalf Of Martin, Larry D
> Sent: Wednesday, December 05, 2012 6:33 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Historical question regarding the stop command
> 
> Tim,
> 
> I believe the reason for the "Start in order to Stop" process is
> required in order to stop Unix Daemons that are running as a part of
> the process.  I agree that the code to handle STOP and MODIFY commands
> is quite simple, but I don't have any experience starting and stopping
> Daemons.
> 
> ......Larry
> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU]
> On Behalf Of Tim Hare
> Sent: Tuesday, December 04, 2012 4:22 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Historical question regarding the stop command
> 
> I'm sure this has been asked and answered somewhere in the dusty
> archives of this list, but I honestly couldn't figure out a way to
> formulate a search for it that would return mostly useful
> information....
> 
> Does anyone know the historical/technical reason for some products, (at
> our shop CA-Datacom and possibly SAS SHARe) requiring you to START a
> task, to STOP their started task?   I know it's ridiculous of me but it
> drives me nuts to have to start something when I want to stop something
> else.
> 
> I've written code of my own which handles the STOP and MODIFY commands,
> so I know that it's not extremely difficult;  it's pretty well
> documented in the manuals too if I recall.   I wrote the code years
> ago, so it's not like the ability just became available, either.
> 
> So - anyone know why this particular technique is used?  Is there some
> technical reason for it?
> 
> Thanks for any and all information and/or entertainment your answers
> will provide...
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send
> email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
> 
> 
> 
> This E-mail and any of its attachments may contain Prince George’s
> County Government or Prince George's County 7th Judicial Circuit Court
> proprietary information or Protected Health Information, which is
> privileged and confidential.  This E-mail is intended solely for the
> use of the individual or entity to which it is addressed.  If you are
> not the intended recipient of this E-mail, you are hereby notified that
> any dissemination, distribution, copying, or action taken in relation
> to the contents of and attachments to this E-mail is strictly
> prohibited by federal law and may expose you to civil and/or criminal
> penalties. If you have received this E-mail in error, please notify the
> sender immediately and permanently delete the original and any copy of
> this E-mail and any printout.
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send
> email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to