Stops a System Resource Controller (SRC) subsystem.
System Resource Controller Library (libsrc.a)
#include <spc.h>
srcstop(Host, SubsystemName, SubsystemPID, StopType) srcstop(ReplyLength, ServerReply, StopFrom) char *Host, *SubsystemName; int SubsystemPID, StopFrom; short StopType, *ReplyLength; struct srcrep *ServerReply;
The srcstop subroutine sends a stop subsystem request to a subsystem and waits for a stop reply from the System Resource Controller (SRC) or the subsystem. The srcstop subroutine can only stop a subsystem that was started by the SRC.
Upon successful completion, the srcstop subroutine returns SRC_OK or SRC_STPOK.
The srcstop subroutine fails if one or more of the following are true:
SRC_BADFSIG | The stop force signal is an invalid signal. |
SRC_BADNSIG | The stop normal signal is an invalid signal. |
SRC_BADSOCK | The stop request could not be passed to the subsystem on its communication socket. |
SRC_DMNA | The SRC daemon is not active. |
SRC_INET_AUTHORIZED_HOST | The local host is not in the remote /etc/hosts.equiv file. |
SRC_INET_INVALID_HOST | On the remote host, the local host is not known. |
SRC_INVALID_USER | The user is not root or group system. |
SRC_MMRY | An SRC component could not allocate the memory it needs. |
SRC_NORPLY | The request timed out waiting for a response. |
SRC_NOTROOT | The SRC daemon is not running as root. |
SRC_SOCK | There is a problem with SRC socket communications. |
SRC_STPG | The request was not passed to the subsystem. The subsystem is stopping. |
SRC_SVND | The subsystem is unknown to the SRC daemon. |
SRC_UDP | The remote SRC port is not defined in the /etc/services file. |
SRC_UHOST | The foreign host is not known. |
SRC_PARM | Invalid parameter passed. |
int rc; struct svrreply svrreply; short replen=sizeof(svrreply); rc=srcstop("MaryC","srctest",0,FORCE,&replen,&svrreply,SDAEMON);
This request stops a subsystem with a stop type of FORCE for all instances of the subsystem srctest on the MaryC machine and does not print a message to standard output about the status of the stop.
struct svrreply svrreply; short replen=sizeof(svrreply); rc=srcstop("","",999,CANCEL,&replen,&svrreply,SSHELL);This request stops a subsystem with a stop type of CANCEL, with the process ID of 999 on the local machine and prints a message to standard output about the status of the stop.
This subroutine is part of Base Operating System (BOS) Runtime.
/etc/services | Defines sockets and protocols used for Internet services. |
/dev/SRC | Specifies the AF_UNIX socket file. |
/dev/.SRC-unix | Specifies the location for temporary socket files. |
The srcrrqs subroutine, srcsbuf subroutine, srcsrpy subroutine, srcsrqt subroutine, srcstat subroutine, srcstathdr subroutine, srcstattxt subroutine, srcstrt subroutine.
List of SRC Subroutines in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.
Programming Subsystem Communication with the SRC in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.
System Resource Controller (SRC) Overview for Programmers in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.